Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env.production.example
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ NEXT_PUBLIC_BACKEND_URL="https://robodrone.codersforcauses.com/api"
# BACKEND
APP_NAME=DjangoAPI
API_SECRET_KEY= CHANGE THIS TO A RANDOM STRING
API_ALLOWED_HOSTS=".localhost 127.0.0.1 [::1]"
API_ALLOWED_HOSTS=".localhost 127.0.0.1 [::1] .codersforcauses.org"

POSTGRES_HOST=db
POSTGRES_NAME=postgres
Expand Down
6 changes: 6 additions & 0 deletions server/api/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@
else []
)

CSRF_TRUSTED_ORIGINS = (
"http://localhost:3000",
"http://127.0.0.1:3000",
os.environ.get("FRONTEND_URL"),
)

# Application definition

Expand Down Expand Up @@ -70,6 +75,7 @@
CORS_ALLOWED_ORIGINS = [
"http://localhost:3000",
"http://127.0.0.1:3000",
os.environ.get("FRONTEND_URL")
]

ROOT_URLCONF = "api.urls"
Expand Down