mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-21 02:51:08 -05:00
Last with the old frontend
This commit is contained in:
@@ -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"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user