kopia lustrzana https://dev.funkwhale.audio/funkwhale/funkwhale
Ensure we can serve images securely locally
rodzic
5ebaa884c1
commit
14c8073e26
1
.env.dev
1
.env.dev
|
@ -11,3 +11,4 @@ WEBPACK_DEVSERVER_PORT=8080
|
|||
MUSIC_DIRECTORY_PATH=/music
|
||||
BROWSABLE_API_ENABLED=True
|
||||
CACHEOPS_ENABLED=False
|
||||
FORWARDED_PROTO=http
|
||||
|
|
|
@ -303,6 +303,9 @@ ROOT_URLCONF = 'config.urls'
|
|||
WSGI_APPLICATION = 'config.wsgi.application'
|
||||
ASGI_APPLICATION = "config.routing.application"
|
||||
|
||||
# This ensures that Django will be able to detect a secure connection
|
||||
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
|
||||
|
||||
# AUTHENTICATION CONFIGURATION
|
||||
# ------------------------------------------------------------------------------
|
||||
AUTHENTICATION_BACKENDS = (
|
||||
|
|
|
@ -22,10 +22,6 @@ from .common import * # noqa
|
|||
# Raises ImproperlyConfigured exception if DJANGO_SECRET_KEY not in os.environ
|
||||
SECRET_KEY = env("DJANGO_SECRET_KEY")
|
||||
|
||||
# This ensures that Django will be able to detect a secure connection
|
||||
# properly on Heroku.
|
||||
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
|
||||
|
||||
# django-secure
|
||||
# ------------------------------------------------------------------------------
|
||||
# INSTALLED_APPS += ("djangosecure", )
|
||||
|
|
|
@ -12,6 +12,7 @@ cp /etc/nginx/funkwhale_proxy.conf{.template,}
|
|||
sed -i "s/X-Forwarded-Host \$host:\$server_port/X-Forwarded-Host ${FUNKWHALE_HOSTNAME}:${FORWARDED_PORT}/" /etc/nginx/funkwhale_proxy.conf
|
||||
sed -i "s/proxy_set_header Host \$host/proxy_set_header Host ${FUNKWHALE_HOSTNAME}/" /etc/nginx/funkwhale_proxy.conf
|
||||
sed -i "s/proxy_set_header X-Forwarded-Port \$server_port/proxy_set_header X-Forwarded-Port ${FORWARDED_PORT}/" /etc/nginx/funkwhale_proxy.conf
|
||||
sed -i "s/proxy_set_header X-Forwarded-Proto \$scheme/proxy_set_header X-Forwarded-Proto ${FORWARDED_PROTO}/" /etc/nginx/funkwhale_proxy.conf
|
||||
|
||||
cat /etc/nginx/funkwhale_proxy.conf
|
||||
nginx -g "daemon off;"
|
||||
|
|
Ładowanie…
Reference in New Issue