Files
guilan-ace-backend/config/settings/production.py
Amirhossein Khalili 88b793ed9f
Some checks failed
Backend CI/CD / test (push) Has been cancelled
Backend CI/CD / deploy (push) Has been cancelled
initial commit
2026-05-19 20:53:08 +03:30

22 lines
621 B
Python

from .base import *
DEBUG = False
# Security settings for production
SECURE_BROWSER_XSS_FILTER = True
SECURE_CONTENT_TYPE_NOSNIFF = True
SECURE_HSTS_INCLUDE_SUBDOMAINS = True
SECURE_HSTS_SECONDS = 31536000
SECURE_REDIRECT_EXEMPT = []
SECURE_SSL_REDIRECT = True
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
SESSION_COOKIE_SECURE = True
CSRF_COOKIE_SECURE = True
X_FRAME_OPTIONS = 'DENY'
# 🔹 Exempt /metrics from the redirect so Prometheus can scrape over HTTP
SECURE_REDIRECT_EXEMPT = [r"^metrics$"]
# Logging for production
# LOGGING['handlers']['file']['filename'] = '/var/log/django/django.log'