Closed ocalvet closed 2 years ago
When I configure the allow headers to the following:
AllowedHeaders: []string{"Accept", "Authorization", "Content-Type", "X-CSRF-Token", "contact_id"},
Then I send a request from my react client using the contact_id header on the request I get the following error in the debug log:
Preflight aborted: headers '[Contactid]' not allowed
When I check the code it looks like parseHeaderList function in the utils.go file is removing the underscores from the header list.
Why is this the default behavior?
https://httpwg.org/specs/rfc7230.html#rule.token.separators
https://github.com/rs/cors/pull/103
This should be fixed now for those from the future
Thanks for the fix Ted
When I configure the allow headers to the following:
Then I send a request from my react client using the contact_id header on the request I get the following error in the debug log:
When I check the code it looks like parseHeaderList function in the utils.go file is removing the underscores from the header list.
Why is this the default behavior?