https://serverless-stack.com/ logo
#help
Title
# help
a

Adam Fanello

05/04/2022, 11:42 PM
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

thdxr

05/05/2022, 12:29 AM
I think I ran into this as well but thought we fixed it let me see
I see ANY in there
a

Adam Fanello

05/05/2022, 12:31 AM
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

thdxr

05/05/2022, 12:32 AM
I think we intended to use the key everywhere
a

Adam Fanello

05/05/2022, 12:33 AM
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

Derek Kershner

05/05/2022, 2:35 AM
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

Adam Fanello

05/06/2022, 8:20 PM
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

Derek Kershner

05/06/2022, 8:21 PM
Api | Serverless Stack (SST) (serverless-stack.com)
a

Adam Fanello

05/06/2022, 8:23 PM
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

Derek Kershner

05/06/2022, 8:24 PM
I went from your page to “Constructs” (upper left)
a

Adam Fanello

05/06/2022, 8:25 PM
I see that now. But API was right there on the main page and goes to old docs. 😞
Thank you Derek.
t

thdxr

05/06/2022, 8:35 PM
wait can you explain where the broken link is again?
a

Adam Fanello

05/06/2022, 8:36 PM
serverless-stack.com
Docs
link In nav on the left of the page,
API
link