Replies: 6 comments
-
What do you use for SSL termination? Isn't the SSL termination proxy doing the redirect? |
Beta Was this translation helpful? Give feedback.
-
Hi @nijel, I use AWS CloudFront as proxy, and every https request to CloudFront is translated to http request with If weblate receive standard header Unfortunately I'm forced to use the custom header because CloudFront does not allow X-FORWARDED-PROTO to be set This env |
Beta Was this translation helpful? Give feedback.
-
There is nginx running inside Weblate container which might be causing this (but it should just pass custom headers). The setting seems to be correctly parsed from the environment: weblate/weblate/settings_docker.py Lines 1007 to 1009 in 44cbd0b And passed to Django: https://docs.djangoproject.com/en/5.2/ref/settings/#secure-proxy-ssl-header |
Beta Was this translation helpful? Give feedback.
-
Ah ok, so the nginx inside the weblate docker block custom headers. I think this is the file need fix https://github.com/WeblateOrg/docker/blob/main/etc/nginx/default.tpl in order to handle |
Beta Was this translation helpful? Give feedback.
-
According to the documentation, it should not modify custom headers. |
Beta Was this translation helpful? Give feedback.
-
I think this is the issue, you pass |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the issue
I set this env:
This curl return 301 Moved Permanently:
curl -I <MY_IP> -H "X_CUSTOM_PROTO: HTTPS"
And this curl return 200
curl -I <MY_IP> -H "X-FORWARDED-PROTO: https"
It seems that Django does not use the custom header but the default one.
I already tried
Steps to reproduce the behavior
WEBLATE_SECURE_PROXY_SSL_HEADER=HTTP_X_CUSTOM_PROTO,https
curl -I <MY_IP> -H "X_CUSTOM_PROTO: HTTPS"
Expected behavior
No response
Screenshots
No response
Exception traceback
How do you run Weblate?
Docker container
Weblate versions
Weblate deploy checks
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions