Skip to content

Commit

Permalink
Fix config environment reference
Browse files Browse the repository at this point in the history
  • Loading branch information
campb303 committed Aug 2, 2021
1 parent 462182d commit 1600b7c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/webqueue2api/api/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# Look for JWTs in headers (for access) then cookies (for refresh)
app.config["JWT_TOKEN_LOCATION"] = ["headers", "cookies"]
# Restrict cookies to HTTPS in prod, allow HTTP in dev
app.config["JWT_COOKIE_SECURE"] = False if config.jwt_secret_key == "dev" else True
app.config["JWT_COOKIE_SECURE"] = False if config.environment == "dev" else True
# Restrict cookies using SameSite=strict flag
app.config["JWT_COOKIE_SAMESITE"] = "strict"
# Restrict refresh tokens to /token/refresh endpoint
Expand Down
2 changes: 2 additions & 0 deletions webqueue2api_config.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[api]
environment = dev

0 comments on commit 1600b7c

Please sign in to comment.