Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #4217
Closed
Open
Issue created Oct 22, 2019 by Administrator@rootContributor

[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 as api-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

Assignee
Assign to
Time tracking