fix: update static file handling and proxy settings in Django and Nginx configuration
This commit is contained in:
@@ -121,12 +121,15 @@ USE_TZ = True
|
||||
# Static files (CSS, JavaScript, Images)
|
||||
# https://docs.djangoproject.com/en/5.2/howto/static-files/
|
||||
|
||||
STATIC_URL = 'static/'
|
||||
STATIC_URL = '/mayo-manager/static/'
|
||||
STATIC_ROOT = BASE_DIR / "staticfiles"
|
||||
|
||||
# Proxy settings
|
||||
USE_X_FORWARDED_HOST = True
|
||||
USE_X_FORWARDED_PORT = True
|
||||
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
|
||||
SECURE_SSL_REDIRECT = True
|
||||
|
||||
|
||||
# CSRF Trusted Origins
|
||||
CSRF_TRUSTED_ORIGINS = os.getenv("CSRF_TRUSTED_ORIGINS", "").split(",")
|
||||
|
||||
@@ -38,7 +38,7 @@ http {
|
||||
# Serwowanie aplikacji Vue
|
||||
location /mayo-manager/ {
|
||||
alias /usr/share/nginx/html/;
|
||||
try_files $uri $uri/ /mayo-manager/index.html;
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
# Proxy do API Django
|
||||
|
||||
Reference in New Issue
Block a user