I’m returning something like this to my serverless function:
{
statusCode: 302,
headers: {
'Location': 'https://test.com/',
'Set-Cookie': setCookie
},
body: 'Redirecting...'
}
Also, I’m using this as my settings for the lambda function:
- http:
path: 'auth/steam/verify'
method: get
integration: lambda
request:
template:
application/json: 'bla'
When I send a request to the endpoint, it just sends the literal JSON instead of sending the 302 status code and the headers. I believe this is a problem with lambda integration, but I don’t understand how to solve it.