mirror of
https://github.com/servo/servo.git
synced 2025-07-11 17:33:47 +01:00
9 lines
372 B
Python
9 lines
372 B
Python
def main(request, response):
|
|
response.headers.set("Cache-Control", "no-store")
|
|
|
|
# Allow simple requests, but deny preflight
|
|
if request.method != "OPTIONS":
|
|
response.headers.set("Access-Control-Allow-Credentials", "true")
|
|
response.headers.set("Access-Control-Allow-Origin", request.headers.get("origin"))
|
|
else:
|
|
response.status = 400
|