mirror of
https://github.com/lucaspalomodevelop/eventcally.git
synced 2026-03-13 16:14:36 +00:00
12 lines
391 B
Python
12 lines
391 B
Python
from flask import request
|
|
from flask.sessions import SecureCookieSessionInterface
|
|
|
|
|
|
class CustomSessionInterface(SecureCookieSessionInterface):
|
|
"""Prevent creating session from API requests."""
|
|
|
|
def save_session(self, *args, **kwargs):
|
|
if "authorization" in request.headers:
|
|
return
|
|
return super(CustomSessionInterface, self).save_session(*args, **kwargs)
|