Skip to content

Commit

Permalink
Fix API url, and ensure building absolute urls uses https
Browse files Browse the repository at this point in the history
  • Loading branch information
longhotsummer committed Aug 10, 2023
1 parent 43e1a31 commit 6518d02
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions peachjam/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,8 @@

SESSION_ENGINE = "django.contrib.sessions.backends.signed_cookies"
SESSION_COOKIE_SECURE = True
# nginx sets this header to indicate if the upstream request was secure
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")

# Caches
if DEBUG:
Expand Down
2 changes: 1 addition & 1 deletion peachjam_api/urls_public.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@

urlpatterns = [
# public-facing API
path("v1/", include(router.urls)),
path("", include(router.urls)),
]

0 comments on commit 6518d02

Please sign in to comment.