Back to Lego

HTTP request

docs/content/dns/zz_gen_httpreq.md

4.35.22.2 KB
Original Source
<!-- THIS DOCUMENTATION IS AUTO-GENERATED. PLEASE DO NOT EDIT. --> <!-- providers/dns/httpreq/httpreq.toml --> <!-- THIS DOCUMENTATION IS AUTO-GENERATED. PLEASE DO NOT EDIT. -->

Configuration for HTTP request.

<!--more-->
  • Code: httpreq
  • Since: v2.0.0

Here is an example bash command using the HTTP request provider:

bash
HTTPREQ_ENDPOINT=http://my.server.com:9090 \
lego --dns httpreq -d '*.example.com' -d example.com run

Credentials

Environment Variable NameDescription
HTTPREQ_ENDPOINTThe URL of the server
HTTPREQ_MODERAW, none

The environment variable names can be suffixed by _FILE to reference a file instead of a value. More information [here]({{% ref "dns#configuration-and-credentials" %}}).

Additional Configuration

Environment Variable NameDescription
HTTPREQ_HTTP_TIMEOUTAPI request timeout in seconds (Default: 30)
HTTPREQ_PASSWORDBasic authentication password
HTTPREQ_POLLING_INTERVALTime between DNS propagation check in seconds (Default: 2)
HTTPREQ_PROPAGATION_TIMEOUTMaximum waiting time for DNS propagation in seconds (Default: 60)
HTTPREQ_USERNAMEBasic authentication username

The environment variable names can be suffixed by _FILE to reference a file instead of a value. More information [here]({{% ref "dns#configuration-and-credentials" %}}).

Description

The server must provide:

  • POST /present
  • POST /cleanup

The URL of the server must be defined 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. -->