05/22 Enhance codes and fix bugs
This commit is contained in:
@@ -82,6 +82,10 @@ class DevelopmentConfig(Config):
|
||||
|
||||
class ProductionConfig(Config):
|
||||
DEBUG = False
|
||||
# Session cookie hardening — enforce HTTPS-only, no JS access, strict same-site.
|
||||
SESSION_COOKIE_SECURE = True # only sent over HTTPS
|
||||
SESSION_COOKIE_HTTPONLY = True # not accessible via document.cookie
|
||||
SESSION_COOKIE_SAMESITE = 'Lax' # blocks cross-site POST forgery; 'Strict' would break OAuth flows
|
||||
|
||||
|
||||
config = {
|
||||
|
||||
Reference in New Issue
Block a user