DiamondDragon
DiamondDragon10mo ago

CORS issue with Lambda Handler (SST)

no idea what's going on with this error. been stuck on it for way too long. i tried adding the test-header to the server side but not seeing it come through? should that happen?
i went through this issue but doesn't seem to work for me
Access to fetch at 'https://x.execute-api.us-west-2.amazonaws.com/properties.fetchProperties?batch=1' from origin 'http://localhost:5173' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Access to fetch at 'https://x.execute-api.us-west-2.amazonaws.com/properties.fetchProperties?batch=1' from origin 'http://localhost:5173' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
No description
No description
No description
1 Reply
DiamondDragon
DiamondDragon10mo ago
@alexkatt I saw you were in the GitHub issue linked but it seems like this problem is in the tRPC lamba handler. I have the allow origin header set in code but server is not responding with it? Fixed it 👍