OLD | NEW |
(Empty) | |
| 1 def main(request, response): |
| 2 headers = [] |
| 3 if "cors" in request.GET: |
| 4 headers.append(("Access-Control-Allow-Origin", "*")) |
| 5 headers.append(("Access-Control-Allow-Credentials", "true")) |
| 6 headers.append(("Access-Control-Allow-Methods", "GET, POST, PUT, FOO")) |
| 7 headers.append(("Access-Control-Allow-Headers", "x-test, x-foo")) |
| 8 headers.append(("Access-Control-Expose-Headers", "x-request-method")) |
| 9 |
| 10 headers.append(("x-request-method", request.method)) |
| 11 return headers, request.body |
OLD | NEW |