[REQ] Add warning on headers with underscores
Created by: ybelenko
Is your feature request related to a problem? Please describe.
Already discussed a bit in #3658. Quote:
Apache and Nginx webservers avoid underscores in HTTP headers, so
api_key
header received asapi-key
. Refs: Cannot retrieve all request headers using PHP slim framework and Why underscores are forbidden in HTTP header names.
Describe the solution you'd like
Maybe we should add warnings when headers contains underscores. I would add this to DefaultCodegen
. I've read somewhere that headers with underscores can cause server security problems.
Describe alternatives you've considered
We can add generator option to disable this warnings. This might be useful when user already configured Nginx/Apache to allow headers with underscores.
Additional context
cc @OpenAPITools/generator-core-team