v1 upgrade: - I can't find a replacement for CORS ...
# help
a
v1 upgrade: • I can't find a replacement for CORS
allowMethods: [CorsHttpMethod.ANY],
. A value of
["*"]
should (less clearly) do it, but that isn't an accepted value. I see SST is using CorsHttpMethod internally, but won't let me.
t
I think I ran into this as well but thought we fixed it let me see
I see ANY in there
a
Ah, I thought it would be
"*"
Other places where enums were taken away, the value of the old enum is used. In this case, it's the name.
t
I think we intended to use the key everywhere
a
Okay. I had my own wrapper/helpers for APIs/routes/functions to reduce duplication, and struggling to get it work in v1. 😞
Thanks for this though.
d
Okay. I had my own wrapper/helpers for APIs/routes/functions to reduce duplication, and struggling to get it work in v1. 😞
We got pinged hard for this too, mostly surrounding authorizers.
a
I thought rather than trying to convert to the new API, it might be easier to understand if I just started from scratch... but I can't find the v1 documentation. https://docs.serverless-stack.com/api is still v0.
d
Api | Serverless Stack (SST) (serverless-stack.com)
a
Why is this hiding? I went from serverless-stack.com and clicked Docs. This goes to v0 at docs.serverless-stack.com. (Clicked on Usage / API in the left-side nav.)
d
I went from your page to “Constructs” (upper left)
a
I see that now. But API was right there on the main page and goes to old docs. 😞
Thank you Derek.
t
wait can you explain where the broken link is again?
a
serverless-stack.com
Docs
link In nav on the left of the page,
API
link