A multipurpose python flask API server and administration SPA
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

16 lines
524 B

"""Session specific utilities."""
from typing import Any
from flask.sessions import SecureCookieSessionInterface
class DisableSessionInterface(SecureCookieSessionInterface):
"""Make sure no session data is transmitted or stored."""
def should_set_cookie(self, app: Any, session: Any) -> bool:
"""Disable default cookie generation."""
return False
def save_session(self, app: Any, session: Any, response: Any) -> Any:
"""Prevent creating session from requests."""
return None