diff --git a/README.md b/README.md index 4340167..29b99e1 100644 --- a/README.md +++ b/README.md @@ -309,6 +309,9 @@ and sign out at `https:///_google-auth/logout`. `location /foo` prefix blocks will be shadowed by this plugin's catch-all regex location — use `location ^~ /foo` in your own snippets if you need them to win. +- **dokku-letsencrypt HTTP-01 renewals** keep working: the catch-all skips + `/.well-known/acme-challenge/`, so the challenge location letsencrypt + writes during a renewal is served without a Google session. - **Non-browser clients** (curl, fetch without `Accept: text/html`) get a JSON `401` instead of a redirect chain. - **Websockets** work — upgrade headers are forwarded exactly like dokku's diff --git a/functions b/functions index a4956dd..bd620ae 100644 --- a/functions +++ b/functions @@ -461,8 +461,11 @@ EOF cat <"$CONF" || fail "conf generation failed" grep -q 'proxy_pass http://myapp-5000;' "$CONF" || fail "conf should proxy to the app upstream" grep -q 'auth_request /_google-auth/verify;' "$CONF" || fail "conf should gate with auth_request" +grep -qF 'location ~ ^/(?!\.well-known/acme-challenge(/|$)) {' "$CONF" || fail "catch-all should leave the letsencrypt challenge path alone" grep -q 'location ^~ /api/webhooks {' "$CONF" || fail "conf should contain prefix exclusion" grep -q 'location ~ ^/healthz$ {' "$CONF" || fail "conf should contain regex exclusion" grep -q 'error_page 401 = @google_auth_signin;' "$CONF" || fail "conf should redirect 401s to signin"