In my flask application, I need to set Access-Control-Max-Age
. What is the correct syntax for it?
from flask import Flask, send_from_directory
from flask_cors import CORS, cross_origin
app = Flask(__name__,static_folder='./build')
CORS(app)
reference: https://flask-cors.readthedocs.io/en/latest/api.html
Take a look at
flask_cors.CORS
section, themax_age
part.According to the docs, you may need to init your
CORS
with this parameter.