Last with the old frontend

This commit is contained in:
pacnpal
2025-08-28 11:37:24 -04:00
parent 08a4a2d034
commit c4702559fb
10 changed files with 3434 additions and 6 deletions

View File

@@ -4,6 +4,9 @@ Local development settings for thrillwiki project.
from ..settings import database
import logging
import os
from decouple import config
import re
from .base import (
BASE_DIR,
INSTALLED_APPS,
@@ -45,6 +48,31 @@ CSRF_TRUSTED_ORIGINS = [
"https://beta.thrillwiki.com",
]
CORS_ALLOWED_ORIGIN_REGEXES = [
# Matches http://localhost:3000, http://localhost:3001, etc.
r"^http://localhost:\d+$",
# Matches http://127.0.0.1:3000, http://127.0.0.1:8080, etc.
r"^http://127\.0\.0\.1:\d+$",
]
CORS_ALLOW_HEADERS = [
'accept',
'accept-encoding',
'authorization',
'content-type',
'dnt',
'origin',
'user-agent',
'x-csrftoken',
'x-requested-with',
'x-nextjs-data', # Next.js specific header
]
if DEBUG:
CORS_ALLOW_ALL_ORIGINS = True # ⚠️ Only for development!
else:
CORS_ALLOW_ALL_ORIGINS = False
GDAL_LIBRARY_PATH = "/opt/homebrew/lib/libgdal.dylib"
GEOS_LIBRARY_PATH = "/opt/homebrew/lib/libgeos_c.dylib"