Skip to content
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

force-ssl behind another proxy using http_x_forwarded_proto #3819

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

paucapo
Copy link

@paucapo paucapo commented Jun 22, 2024

Fix for issue #3365 and pull request #3589

@jc21
Copy link
Member

jc21 commented Jun 25, 2024

Change looks good, can you confirm that this docker image works as you expect?

@paucapo
Copy link
Author

paucapo commented Jun 25, 2024

Seems like is working as expected, but maybe some additional tests with configurations a bit more elaborated than mine will be a good idea.

@cbenard
Copy link

cbenard commented Aug 15, 2024

This doesn't work when you have Cloudflare Tunnel (cloudflared) connecting to an https nginx endpoint and they requested HTTP.

The working code changes this:

if ($http_x_forwarded_proto = "https") {
	set $test "";
}

to this:

if ($http_x_forwarded_proto = "http") {
	set $test "H";
}

It then works as expected.

@nginxproxymanagerci
Copy link

CI Error:

/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
certbot-node: Pulling from nginxproxymanager/nginx-full
Digest: sha256:eaa2ebcb50dd87557c9a8f95a3230128d94cac1ea17800261c036e59378e7d49
Status: Image is up to date for nginxproxymanager/nginx-full:certbot-node
docker.io/nginxproxymanager/nginx-full:certbot-node
�[1;34m❯ �[1;36mBuilding Frontend ...�[0m
yarn install v1.22.22
[1/4] Resolving packages...
[2/4] Fetching packages...
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
error Command failed.
Exit code: 128
Command: git
Arguments: clone https:/tabler/tabler.git /usr/local/share/.cache/yarn/v6/.tmp/e11a93799a52aa978c82015e29fbe309
Directory: /app/frontend
Output:
Cloning into '/usr/local/share/.cache/yarn/v6/.tmp/e11a93799a52aa978c82015e29fbe309'...
error: RPC failed; curl 92 HTTP/2 stream 5 was not closed cleanly: CANCEL (err 8)
error: 2310 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants