Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/remi/plug_letsencrypt
PlugLetsEncrypt responds to Let’s Encrypt domain verification requests.
https://github.com/remi/plug_letsencrypt
elixir http letsencrypt plug
Last synced: 27 days ago
JSON representation
PlugLetsEncrypt responds to Let’s Encrypt domain verification requests.
- Host: GitHub
- URL: https://github.com/remi/plug_letsencrypt
- Owner: remi
- License: mit
- Created: 2017-02-16T10:26:55.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-02-16T11:11:17.000Z (over 7 years ago)
- Last Synced: 2024-10-03T07:54:44.755Z (about 1 month ago)
- Topics: elixir, http, letsencrypt, plug
- Language: Elixir
- Size: 9.77 KB
- Stars: 11
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
PlugLetsEncrypt
=================[![Travis](https://img.shields.io/travis/remiprev/plug_letsencrypt.svg?style=flat-square)](https://travis-ci.org/remiprev/plug_letsencrypt)
[![Hex.pm](https://img.shields.io/hexpm/v/plug_letsencrypt.svg?style=flat-square)](https://hex.pm/packages/plug_letsencrypt)`PlugLetsEncrypt` responds to Let’s Encrypt domain verification requests.
Installation
------------Add `plug_letsencrypt` to the `deps` function in your project's `mix.exs` file:
```elixir
defp deps do
[
…,
{:plug_letsencrypt, "~> 0.2"}
]
end
```Then run `mix do deps.get, deps.compile` inside your project's directory.
Usage
-----`PlugLetsEncrypt` can be used just as any other plugs. Add `PlugLetsEncrypt`
with your other plugs and provide a response to serve.```elixir
defmodule Endpoint do
plug PlugLetsEncrypt, response: System.get_env("LETSENCRYPT_RESPONSE")
end
```The `LETSENCRYPT_RESPONSE` is the response Let’s Encrypt will be looking for,
something like:```bash
LETSENCRYPT_RESPONSE=esLXAidxzFUn2kkakqeqwe4Z6VqtechtQtF0.yJLghAfMirn4ejUskeB-GrqSb411923hjX-OWUvDtgc
```The result:
```bash
$ curl -XGET "http://localhost:4000/.well-known/acme-challenge/esLXAidxzFUn2kkakqeqwe4Z6VqtechtQtF0"
esLXAidxzFUn2kkakqeqwe4Z6VqtechtQtF0.yJLghAfMirn4ejUskeB-GrqSb411923hjX-OWUvDtgc$ curl -XGET "http://localhost:4000/.well-known/acme-challenge/anything"
```License
-------`PlugLetsEncrypt` is © 2017 [Rémi Prévost](http://exomel.com) and may be
freely distributed under the [MIT license](https://github.com/remiprev/plug_letsencrypt/blob/master/LICENSE.md). See the
`LICENSE.md` file for more information.