Skip to content

Add directive to avoid https redirect for acme challenge #4662

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docker/rootfs/etc/nginx/conf.d/include/force-ssl.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ if ($scheme = "http") {
if ($request_uri = /.well-known/acme-challenge/test-challenge) {
set $test "${test}T";
}
Comment on lines 5 to 7
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why those lines were added and if they lines can be removed in favor of the lines below

# Following ensures that all request to an acme-challenge are not redircted to https
if ($request_uri ~* ^/.well-known/acme-challenge/) {
set $test "${test}C";
}
if ($test = H) {
return 301 https://$host$request_uri;
}