|
@@ -27,8 +27,8 @@ __app__.secret_key = "aseqzdwxc"
|
|
__app__.permanent_session_lifetime = timedelta(minutes=2)
|
|
__app__.permanent_session_lifetime = timedelta(minutes=2)
|
|
__app__.logger = logger
|
|
__app__.logger = logger
|
|
__app__.config['JSONIFY_PRETTYPRINT_REGULAR'] = True
|
|
__app__.config['JSONIFY_PRETTYPRINT_REGULAR'] = True
|
|
-#flask_cors.CORS(__app__)
|
|
|
|
-#logging.getLogger('flask_cors').level = logging.DEBUG
|
|
|
|
|
|
+flask_cors.CORS(__app__)
|
|
|
|
+logging.getLogger('flask_cors').level = logging.DEBUG
|
|
|
|
|
|
limiter = Limiter(__app__,key_func=get_remote_address,default_limits=["100 per minute"])
|
|
limiter = Limiter(__app__,key_func=get_remote_address,default_limits=["100 per minute"])
|
|
limiter.logger = logger
|
|
limiter.logger = logger
|
|
@@ -68,7 +68,6 @@ def after_request(response : flask.Response):
|
|
# adding this to the header to allow cross origin
|
|
# adding this to the header to allow cross origin
|
|
# for exemple origin cross origin is when website with javascript has it's server (origin 1)
|
|
# for exemple origin cross origin is when website with javascript has it's server (origin 1)
|
|
# and the javascript call some request on another server (origin 2), typically our API.
|
|
# and the javascript call some request on another server (origin 2), typically our API.
|
|
- header['Access-Control-Allow-Credentials'] = 'true'
|
|
|
|
header['Access-Control-Allow-Origin'] = '*'
|
|
header['Access-Control-Allow-Origin'] = '*'
|
|
header['Access-Control-Allow-Methods'] = 'GET,DELETE,UPDATE,HEAD,OPTIONS,POST,PUT,PATCH'
|
|
header['Access-Control-Allow-Methods'] = 'GET,DELETE,UPDATE,HEAD,OPTIONS,POST,PUT,PATCH'
|
|
header['Access-Control-Allow-Headers'] = 'Origin, X-Requested-With, Content-Type, Accept, Authorization'
|
|
header['Access-Control-Allow-Headers'] = 'Origin, X-Requested-With, Content-Type, Accept, Authorization'
|