-
Notifications
You must be signed in to change notification settings - Fork 14
No Cors headers present. #37
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is neededpri-high
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is neededpri-high
Expected behavior:
Serve static Files with cors enabled. No cors headers present.
Actual behavior:
Cors error:
Access to XMLHttpRequest at 'https://[URL]' from origin 'http://localhost:8080' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.Steps to reproduce the problem:
Serve the static file:
event.path = file;
Return fileHandler.get(event, context);
Bonus Workaround
Adding the headers it worked but I need to access to the response object.
Environment:
OS: Debian 10 Buster
Node Version: 10.15.3
serverless-aws-static-file-handler Version: 2.0.4