1
0
mirror of https://github.com/thib8956/nginx-proxy synced 2025-08-23 07:51:56 +00:00

Set auth_request off for all acme challenge locations

Adds missing `auth_request off;` to a few
`.well-known/acme-challenge` location blocks.

This is needed to allow unrestricted access to
`.well-known/acme-challenge` files on servers
where `auth_request` is otherwise globally applied.

See #1409, nginx-proxy/acme-companion#570
This commit is contained in:
Shane St Savage
2025-05-29 18:45:25 +00:00
parent 5c103041ac
commit 7065936244

View File

@@ -865,6 +865,7 @@ server {
{{- if $globals.config.acme_http_challenge_accept_unknown_host }} {{- if $globals.config.acme_http_challenge_accept_unknown_host }}
location ^~ /.well-known/acme-challenge/ { location ^~ /.well-known/acme-challenge/ {
auth_basic off; auth_basic off;
auth_request off;
allow all; allow all;
root /usr/share/nginx/html; root /usr/share/nginx/html;
try_files $uri =404; try_files $uri =404;
@@ -970,6 +971,7 @@ server {
{{- if (and (eq $vhost.https_method "noredirect") $vhost.acme_http_challenge_enabled) }} {{- if (and (eq $vhost.https_method "noredirect") $vhost.acme_http_challenge_enabled) }}
location /.well-known/acme-challenge/ { location /.well-known/acme-challenge/ {
auth_basic off; auth_basic off;
auth_request off;
allow all; allow all;
root /usr/share/nginx/html; root /usr/share/nginx/html;
try_files $uri =404; try_files $uri =404;