Quantcast
Channel: Active questions tagged header - Stack Overflow
Viewing all articles
Browse latest Browse all 653

pass x-api-key header to aws api gateway websocket

$
0
0

I have been looking all around to find a way to pass a x-api-key header to my javascript Websocket object but couldn't find any ressource. I couldn't find any ressource in the aws-sdk doc either.

The code I currently have:

const con = new Websocket(url);

On the API Gateway logs i get a 403 Forbidden: The provided API Key is invalid.Also, note that when passing the header and connecting from Postman, it works fine.

TLDR:
Issue: can't find a way to pass headers using the native javascript Websocket object.
Goal: pass the x-api-key header to the web socket from my Vue app to create a connection.


Viewing all articles
Browse latest Browse all 653

Trending Articles