ash před 2 roky
rodič
revize
2c873afe3d
1 změnil soubory, kde provedl 2 přidání a 3 odebrání
  1. 2 3
      Backend/Sources/View/view_manager.py

+ 2 - 3
Backend/Sources/View/view_manager.py

@@ -27,8 +27,8 @@ __app__.secret_key = "aseqzdwxc"
 __app__.permanent_session_lifetime = timedelta(minutes=2)
 __app__.logger = logger
 __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.logger = logger
@@ -68,7 +68,6 @@ def after_request(response : flask.Response):
     # 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)
     # 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-Methods'] = 'GET,DELETE,UPDATE,HEAD,OPTIONS,POST,PUT,PATCH'
     header['Access-Control-Allow-Headers'] = 'Origin, X-Requested-With, Content-Type, Accept, Authorization'