-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support cors
#449
Comments
One thing that bothers me about the trait is that there's just one Additionally, it requires hardcoding the full domain name (& port as well as protocol, which are also part of the origin) - in my view that's not going to go well together with things like deploying to multiple environments (even just test/prod). We should probably raise this in the upstream. |
This is one of the things I'm really not willing to provide OOTB support for, because it can be supported by http4s-level middleware easily in third-party code/userland. See the http4s docs. Moreover, as @kubukoz states, the cors trait ain't as flexible as it should, so providing OOTB support would be lacking. What we can do however is document how to retrieve hints from services (both in a polymorphic and monomorphic manner), and document an example of doing that for wiring a CORS middleware. |
Issue opened upstream : smithy-lang/smithy#1396 |
Opened #456 to document how to implement such a thing on your own until the issue is fixed upstream |
Gonna close this, the documentation on how to enable CORS is enough. |
Some users have requested the ability to generate the code to support CORS. This trait currently is not taken in consideration by the
simpleRestJson
protocol.https://awslabs.github.io/smithy/2.0/spec/http-bindings.html?highlight=cords#cors-trait
The text was updated successfully, but these errors were encountered: