Custom header with undercore is been normilize to a header without it
ocalvet opened this issue · comments
Ovidio Calvet commented
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?
Ariel Herrera commented
Ted Marozzi commented
This should be fixed now for those from the future
Peter Kieltyka commented
Thanks for the fix Ted