mirror of
https://github.com/simple-login/app.git
synced 2024-11-17 01:18:29 +01:00
58990ec762
* Hide proton integration behind cookie * Make cookie name configurable via config
12 lines
346 B
Python
12 lines
346 B
Python
from app.config import CONNECT_WITH_PROTON, CONNECT_WITH_PROTON_COOKIE_NAME
|
|
from flask import request
|
|
|
|
|
|
def is_connect_with_proton_enabled() -> bool:
|
|
if CONNECT_WITH_PROTON:
|
|
return True
|
|
if CONNECT_WITH_PROTON_COOKIE_NAME and request.cookies.get(
|
|
CONNECT_WITH_PROTON_COOKIE_NAME
|
|
):
|
|
return True
|
|
return False
|