fix dla xiastek not secure
This commit is contained in:
9
app.py
9
app.py
@@ -86,6 +86,8 @@ talisman = Talisman(
|
||||
content_security_policy=csp_policy,
|
||||
x_content_type_options=app.config.get("ENABLE_XCTO", True),
|
||||
strict_transport_security_include_subdomains=False,
|
||||
referrer_policy=app.config.get("REFERRER_POLICY"),
|
||||
|
||||
)
|
||||
|
||||
register_heif_opener() # pillow_heif dla HEIC
|
||||
@@ -830,7 +832,12 @@ def system_auth():
|
||||
reset_failed_attempts(ip)
|
||||
resp = redirect(next_page)
|
||||
max_age = app.config.get("AUTH_COOKIE_MAX_AGE", 86400)
|
||||
resp.set_cookie("authorized", AUTHORIZED_COOKIE_VALUE, max_age=max_age)
|
||||
resp.set_cookie(
|
||||
"authorized",
|
||||
AUTHORIZED_COOKIE_VALUE,
|
||||
max_age=max_age,
|
||||
secure=request.is_secure
|
||||
)
|
||||
return resp
|
||||
else:
|
||||
register_failed_attempt(ip)
|
||||
|
Reference in New Issue
Block a user