mirror of
https://oauth2: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@github.com/m1ngsama/chopsticks.git
synced 2026-06-26 05:44:38 +08:00
14 lines
414 B
Python
14 lines
414 B
Python
"""Small helpers for the README demo server."""
|
|
|
|
|
|
def apply_cors(headers):
|
|
"""Return response headers with permissive demo CORS."""
|
|
next_headers = dict(headers)
|
|
next_headers["Access-Control-Allow-Origin"] = "*"
|
|
next_headers["Access-Control-Allow-Headers"] = "Content-Type"
|
|
return next_headers
|
|
|
|
|
|
def log_request(path):
|
|
"""Format a deterministic request log line."""
|
|
return f"GET {path}"
|