0

I have to use a JWT header (key) that is all caps and has underscores, but in a recent version, Werkzeug 2.3.x just discards headers with underscores. I have a decorator that helps parse request headers and due to this change, I cannot upgrade versions as much as I’d like to.

Reference: https://github.com/pallets/werkzeug/pull/2622

From the consumer side, I have tried using the same header key with dashes, and that does actually work without any code changes to the provider API. However it’s not feasible or even possible for me to update the swagger spec, let alone update all of the places where the request is made.

Any help would be great, thanks.

user77262
  • 1
  • 1
  • This comment is probably not very useful for you, but have you been using Werkzeug in production? That's generally not a good idea. Most production-ready web servers discard such headers anyway: https://stackoverflow.com/questions/22856136/why-do-http-servers-forbid-underscores-in-http-header-names – Selcuk May 16 '23 at 01:52

0 Answers0