-
-
Notifications
You must be signed in to change notification settings - Fork 823
Closed
Labels
Description
Access to XMLHttpRequest at 'http://127.0.0.1:8001/test_middleware/' from origin 'http://127.0.0.1:8082' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Adding a header to each send response solve the above problem but I don't want to add a header to each response.
self.send_response(200, b"xxx"
headers=[
(b"Content-Type", b"application/json"),
(b"Access-Control-Allow-Origin", b"*"),
]
)
Reactions are currently unavailable