fix: update static file handling and proxy settings in Django and Nginx configuration

This commit is contained in:
2025-11-30 00:02:11 +01:00
parent d9fb67a1d5
commit 109761ea94
2 changed files with 5 additions and 2 deletions

View File

@@ -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(",")

View File

@@ -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