aws-northstar icon indicating copy to clipboard operation
aws-northstar copied to clipboard

Refused to set unsafe header "host"

Open raurir opened this issue 5 months ago • 0 comments

We get multiple errors in our app using useSigV4Client

The error is Refused to set unsafe header "host" on every request.

It stems from this line of code:

https://github.com/aws/aws-northstar/blob/main/packages/ui/src/components/CognitoAuth/hooks/useSigv4Client/utils/awsSigv4Fetch/index.ts#L59

We have monkey patched this by adding delete signedRequest.headers['host'], which seems very unsafe. Is there a better solution?

Thank you.

raurir avatar Sep 26 '24 01:09 raurir