|
|
@ -102,3 +102,12 @@ def set_sqlite_pragma(dbapi_connection, connection_record): |
|
|
|
def inject_language(): |
|
|
|
def inject_language(): |
|
|
|
lang = Language(request) |
|
|
|
lang = Language(request) |
|
|
|
return {"i18n": lang.i18n} |
|
|
|
return {"i18n": lang.i18n} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@laberflask.after_request |
|
|
|
|
|
|
|
def after_request(response): |
|
|
|
|
|
|
|
response.headers.add('Access-Control-Allow-Origin', '*') |
|
|
|
|
|
|
|
response.headers.add('Access-Control-Allow-Headers', 'Content-Type,Authorization') |
|
|
|
|
|
|
|
response.headers.add('Access-Control-Allow-Methods', 'GET,POST,,OPTIONS') |
|
|
|
|
|
|
|
response.headers.add('Access-Control-Allow-Credentials', 'true') |
|
|
|
|
|
|
|
return response |
|
|
|