2019-03-08 18:47:06 +00:00
|
|
|
---
|
|
|
|
title: "HTTP request"
|
|
|
|
date: 2019-03-03T16:39:46+01:00
|
|
|
|
draft: false
|
|
|
|
slug: httpreq
|
2022-06-16 22:25:42 +00:00
|
|
|
dnsprovider:
|
|
|
|
since: "v2.0.0"
|
|
|
|
code: "httpreq"
|
|
|
|
url: "/lego/dns/httpreq/"
|
2019-03-08 18:47:06 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
<!-- THIS DOCUMENTATION IS AUTO-GENERATED. PLEASE DO NOT EDIT. -->
|
|
|
|
<!-- providers/dns/httpreq/httpreq.toml -->
|
|
|
|
<!-- THIS DOCUMENTATION IS AUTO-GENERATED. PLEASE DO NOT EDIT. -->
|
|
|
|
|
|
|
|
|
2022-02-23 23:07:58 +00:00
|
|
|
Configuration for [HTTP request](/lego/dns/httpreq/).
|
2019-03-08 18:47:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!--more-->
|
|
|
|
|
|
|
|
- Code: `httpreq`
|
2022-06-16 22:25:42 +00:00
|
|
|
- Since: v2.0.0
|
|
|
|
|
2019-03-08 18:47:06 +00:00
|
|
|
|
|
|
|
Here is an example bash command using the HTTP request provider:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
HTTPREQ_ENDPOINT=http://my.server.com:9090 \
|
2022-06-16 22:25:42 +00:00
|
|
|
lego --email you@example.com --dns httpreq --domains my.example.org run
|
2019-03-08 18:47:06 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Credentials
|
|
|
|
|
|
|
|
| Environment Variable Name | Description |
|
|
|
|
|-----------------------|-------------|
|
|
|
|
| `HTTPREQ_ENDPOINT` | The URL of the server |
|
|
|
|
| `HTTPREQ_MODE` | `RAW`, none |
|
|
|
|
|
2019-03-18 16:42:54 +00:00
|
|
|
The environment variable names can be suffixed by `_FILE` to reference a file instead of a value.
|
2022-06-16 22:25:42 +00:00
|
|
|
More information [here]({{< ref "dns#configuration-and-credentials" >}}).
|
2019-03-18 16:42:54 +00:00
|
|
|
|
2019-03-08 18:47:06 +00:00
|
|
|
|
|
|
|
## Additional Configuration
|
|
|
|
|
|
|
|
| Environment Variable Name | Description |
|
|
|
|
|--------------------------------|-------------|
|
|
|
|
| `HTTPREQ_HTTP_TIMEOUT` | API request timeout |
|
2019-05-06 17:37:51 +00:00
|
|
|
| `HTTPREQ_PASSWORD` | Basic authentication password |
|
2019-03-08 18:47:06 +00:00
|
|
|
| `HTTPREQ_POLLING_INTERVAL` | Time between DNS propagation check |
|
|
|
|
| `HTTPREQ_PROPAGATION_TIMEOUT` | Maximum waiting time for DNS propagation |
|
2019-05-06 17:37:51 +00:00
|
|
|
| `HTTPREQ_USERNAME` | Basic authentication username |
|
2019-03-08 18:47:06 +00:00
|
|
|
|
2019-03-18 16:42:54 +00:00
|
|
|
The environment variable names can be suffixed by `_FILE` to reference a file instead of a value.
|
2022-06-16 22:25:42 +00:00
|
|
|
More information [here]({{< ref "dns#configuration-and-credentials" >}}).
|
2019-03-18 16:42:54 +00:00
|
|
|
|
2019-03-08 18:47:06 +00:00
|
|
|
## Description
|
|
|
|
|
|
|
|
The server must provide:
|
|
|
|
|
|
|
|
- `POST` `/present`
|
|
|
|
- `POST` `/cleanup`
|
|
|
|
|
|
|
|
The URL of the server must be define by `HTTPREQ_ENDPOINT`.
|
|
|
|
|
|
|
|
### Mode
|
|
|
|
|
|
|
|
There are 2 modes (`HTTPREQ_MODE`):
|
|
|
|
|
|
|
|
- default mode:
|
|
|
|
```json
|
|
|
|
{
|
|
|
|
"fqdn": "_acme-challenge.domain.",
|
|
|
|
"value": "LHDhK3oGRvkiefQnx7OOczTY5Tic_xZ6HcMOc_gmtoM"
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
- `RAW`
|
|
|
|
```json
|
|
|
|
{
|
|
|
|
"domain": "domain",
|
|
|
|
"token": "token",
|
|
|
|
"keyAuth": "key"
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
### Authentication
|
|
|
|
|
|
|
|
Basic authentication (optional) can be set with some environment variables:
|
|
|
|
|
|
|
|
- `HTTPREQ_USERNAME` and `HTTPREQ_PASSWORD`
|
|
|
|
- both values must be set, otherwise basic authentication is not defined.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- THIS DOCUMENTATION IS AUTO-GENERATED. PLEASE DO NOT EDIT. -->
|
|
|
|
<!-- providers/dns/httpreq/httpreq.toml -->
|
|
|
|
<!-- THIS DOCUMENTATION IS AUTO-GENERATED. PLEASE DO NOT EDIT. -->
|