Skip to content

Commit

Permalink
🔧[#45] add session and CSRF samesite option
Browse files Browse the repository at this point in the history
  • Loading branch information
Coperh committed Jul 16, 2024
1 parent 44eb847 commit 990af9a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions open_api_framework/conf/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,16 @@
#
SESSION_COOKIE_SECURE = IS_HTTPS
SESSION_COOKIE_HTTPONLY = True
# set same-site attribute to None to allow emdedding the SDK for making cross domain
# requests.
SESSION_COOKIE_SAMESITE = config(
"SESSION_COOKIE_SAMESITE", default="None" if IS_HTTPS else "Lax"
)

CSRF_COOKIE_SECURE = IS_HTTPS
CSRF_COOKIE_SAMESITE = config(
"CSRF_COOKIE_SAMESITE", default="None" if IS_HTTPS else "Lax"
)

X_FRAME_OPTIONS = "DENY"

Expand Down

0 comments on commit 990af9a

Please sign in to comment.