I'm having some issues with CORS when I access my ...
# help
p
I'm having some issues with CORS when I access my api from another webserver (actually a Flutter app running in a browser). It's mainly pre-flight that is acting up. I didn't see anything special regarding CORS from SST, it's all standard CDK here? Anybody got it fixed in a nice way? 🙂
f
Hey @PĂ„l Brattberg, are you using the
sst.Api
construct?
p
Not at the moment, but since I got the authorizer running, now might be agood time to try. Is there CORS-support built in?
f
yeah CORS is enabled by default with all (ie. “*”) headers, methods, and origins
p
testing
Hey! Seems to work very nicely! 🙏
f
Nice!
p
Btw, there's no way to simple skip authorization for one route and using auth for the rest is there?
All routes are secure with the exception of /ping etc
f
You can set the
authorizationType
to NONE for the
/ping
route
p
Ah, beautiful. Thanks for all your help!