-
-
Notifications
You must be signed in to change notification settings - Fork 771
Closed
Description
Currently the CORS headers served are:
datasette/datasette/utils/__init__.py
Lines 1139 to 1143 in 9584879
def add_cors_headers(headers): | |
headers["Access-Control-Allow-Origin"] = "*" | |
headers["Access-Control-Allow-Headers"] = "Authorization, Content-Type" | |
headers["Access-Control-Expose-Headers"] = "Link" | |
headers["Access-Control-Allow-Methods"] = "GET, POST, HEAD, OPTIONS" |
Serving Access-Control-Max-Age: 600
would allow browsers to cache that for 10 minutes, avoiding additional CORS pre-flight OPTIONS requests during that time.