Working .env setup

This commit is contained in:
JakeBreath
2026-08-03 10:39:19 -05:00
parent f593d16ca4
commit 2764644d8b
19 changed files with 546 additions and 66 deletions
+15 -3
View File
@@ -54,6 +54,7 @@ MIDDLEWARE = [
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'common.middleware.TimingMiddleware',
'common.middleware.GateMiddleware',
]
ROOT_URLCONF = 'common.urls'
@@ -61,7 +62,7 @@ ROOT_URLCONF = 'common.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'DIRS': [BASE_DIR / 'templates'],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
@@ -130,7 +131,10 @@ SESSION_COOKIE_AGE = 86400
# Production Server BS over here
CSRF_TRUSTED_ORIGINS = [
'https://jakerasp.rainbow-herring.ts.net'
'https://jakerasp.rainbow-herring.ts.net',
'http://127.0.0.1'
'http://jakerasp',
'http://localhost'
]
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
USE_X_FORWARDED_HOST = True
@@ -147,7 +151,15 @@ STATIC_URL = '/static/'
STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static')]
STATIC_ROOT = BASE_DIR / 'staticfiles'
# Media (pack downloads, user assets) — served through Django behind the gate
MEDIA_URL = '/media/'
MEDIA_ROOT = BASE_DIR / 'media'
# Login settings
LOGIN_URL = 'login'
LOGIN_URL = 'profiles:login'
LOGIN_REDIRECT_URL = '/'
# Gate settings — URL the GateMiddleware redirects HTML pages to
GATE_URL = '/'
SESSION_EXPIRE_AT_BROWSER_CLOSE = False