mirror of
https://github.com/servo/servo.git
synced 2025-07-03 05:23:38 +01:00
12 lines
372 B
Python
12 lines
372 B
Python
import json
|
|
|
|
def main(request, response):
|
|
headers = [("Content-Type", "application/json"),
|
|
("Access-Control-Allow-Credentials", "true")]
|
|
|
|
if "origin" in request.headers:
|
|
headers.append(("Access-Control-Allow-Origin", request.headers["origin"]))
|
|
|
|
|
|
body = json.dumps({ "header": request.headers["sec-metadata"] })
|
|
return headers, body
|