What is the recommended way that I can set a location header on 201 responses with an sst.Api?
g
Garret Harp
11/30/2021, 8:49 PM
afaik the only headers aws will actually manage for you are cors if you want any other headers you would have to do it via code in the attached lambda
ö
Ömer Toraman
11/30/2021, 9:14 PM
I guess you can use response mapping templates, I’m not really sure if that is available for HTTP API though. But yeah I guess doing with code seems pretty fine to me
j
jamlen
12/01/2021, 10:05 AM
Is the api url available to the API lambda's? I've seen I can get the url and pass it as an env var to the frontend, but is it available inside the API itself?