We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This header allows the client to remember the CORS result so it doesn't have to perform a pre-flight OPTIONS request before every POST etc.
OPTIONS
POST
access-control-max-age: 7200
The text was updated successfully, but these errors were encountered:
2f99fd2
I tested this - and the other features - with a tiny temporary plugin here running on Datasette Cloud: https://gist.github.com/simonw/59ccfeb2a9de09151d08df2b64336d03
from asgi_cors import asgi_cors from datasette import hookimpl @hookimpl def asgi_wrapper(datasette): def wrap_with_asgi_cors(app): return asgi_cors( app, allow_all=True, methods=("GET", "POST", "OPTIONS"), headers=("authorization", "link", "content-type"), max_age=60 ) return wrap_with_asgi_cors
Here's a screenshot showing the 60s access-control-max-age working:
access-control-max-age
Sorry, something went wrong.
Release 1.0
744a760
Refs #5, #7, #10, #11, #12
No branches or pull requests
This header allows the client to remember the CORS result so it doesn't have to perform a pre-flight
OPTIONS
request before everyPOST
etc.The text was updated successfully, but these errors were encountered: