whitelist - fix /.well-known/acme-challenge whitelist for let's encrypt

This commit is contained in:
bunkerity 2021-07-05 14:15:25 +02:00
parent 2ccfb26e81
commit 92ee40819e
No known key found for this signature in database
GPG Key ID: 3D80806F12602A7C
1 changed files with 1 additions and 1 deletions

View File

@ -117,7 +117,7 @@ for k, v in pairs(whitelist_uri) do
end
-- check if it's certbot
if use_lets_encrypt and string.match(ngx.var.request_uri, "^/.well-known/acme-challenge/") then
if use_lets_encrypt and string.match(ngx.var.request_uri, "^/%.well%-known/acme%-challenge/[A-Za-z0-9%-%_]+$") then
logger.log(ngx.INFO, "LETSENCRYPT", "got a visit from Let's Encrypt")
ngx.exit(ngx.OK)
end