My WebSocket API needs to be able to use a custom subprotocol.
I have been able to do this by returning the proper Sec-WebSocket-Protocol header using AWS_PROXY lambda integration approach described in AWS docs here: https://docs.aws.amazon.com/apigateway/latest/developerguide/websocket-connect-route-subprotocol.html.
The downside of that approach is that creating a dedicated lambda to just return a static header on each connect is an overkill. Is it possible to return the Sec-WebSocket-Protocol header on $connect using a Mock Integration instead?
I tried playing with different response mappings of the Mock Integration but couldn't make it return this static header.
It looks like you can't control the Sec-WebSocket-Protocol at all while using the Mock Integration, what about other integrations?