Hi all
I am trying to build a serverless api with authentication using golang. (golang + netlify novice/intermediate)
So far I have had multiple issues with more complex setups using lambda adapters and netlify dev.
As a result I tried to narrow it down to a more hello world-like test (below), and I think I have found an issue with multi value headers, that might be causing the issue for my more complex setup.
I read in a thread that multiValueHeaders is supported in netlify, but could not find any mention of it in docs.
@futuregerald Maybe you can help?
package main
import (
"context"
"net/http"
"github.com/aws/aws-lambda-go/events"
"github.com/aws/aws-lambda-go/lambda"
)
func handler(ctx context.Context, req events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error) {
return events.APIGatewayProxyResponse{
StatusCode: http.StatusOK,
Body: "hi",
// this header shows up in debugging/devtools
Headers: map[string]string{
"X-Foo": "1",
},
// this doesn't seem to work
MultiValueHeaders: map[string][]string{
"X-Bar": {"2"},
}
}, nil
}
func main() {
lambda.Start(handler)
}