mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2025-01-22 06:58:07 +00:00
Merge pull request #2418 from jaschaurbach/Fix-wrong-URL-behind-proxy
set HTTP_X_FORWARDED_PROTO in .env
This commit is contained in:
commit
61d1e67349
3 changed files with 12 additions and 0 deletions
|
@ -108,3 +108,10 @@ OTEL_EXPORTER_OTLP_ENDPOINT=
|
|||
OTEL_EXPORTER_OTLP_HEADERS=
|
||||
# Service name to identify your app
|
||||
OTEL_SERVICE_NAME=
|
||||
|
||||
# Set HTTP_X_FORWARDED_PROTO ONLY to true if you know what you are doing.
|
||||
# Only use it if your proxy is "swallowing" if the original request was made
|
||||
# via https. Please refer to the Django-Documentation and assess the risks
|
||||
# for your instance:
|
||||
# https://docs.djangoproject.com/en/3.2/ref/settings/#secure-proxy-ssl-header
|
||||
HTTP_X_FORWARDED_PROTO=false
|
||||
|
|
1
.github/workflows/django-tests.yml
vendored
1
.github/workflows/django-tests.yml
vendored
|
@ -56,5 +56,6 @@ jobs:
|
|||
EMAIL_USE_TLS: true
|
||||
ENABLE_PREVIEW_IMAGES: false
|
||||
ENABLE_THUMBNAIL_GENERATION: true
|
||||
HTTP_X_FORWARDED_PROTO: false
|
||||
run: |
|
||||
pytest -n 3
|
||||
|
|
|
@ -364,3 +364,7 @@ OTEL_EXPORTER_OTLP_HEADERS = env("OTEL_EXPORTER_OTLP_HEADERS", None)
|
|||
OTEL_SERVICE_NAME = env("OTEL_SERVICE_NAME", None)
|
||||
|
||||
TWO_FACTOR_LOGIN_MAX_SECONDS = 60
|
||||
|
||||
HTTP_X_FORWARDED_PROTO = env.bool("SECURE_PROXY_SSL_HEADER", False)
|
||||
if HTTP_X_FORWARDED_PROTO:
|
||||
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
|
||||
|
|
Loading…
Reference in a new issue