plugins icon indicating copy to clipboard operation
plugins copied to clipboard

www/nginx Feature: allow enabling underscores_in_headers directive in server block

Open hursjohn opened this issue 3 years ago • 3 comments

Important notices Before you add a new report, we ask you kindly to acknowledge the following:

  • [x] I have read the contributing guide lines at https://github.com/opnsense/plugins/blob/master/CONTRIBUTING.md
  • [x] I have searched the existing issues, open and closed, and I'm convinced that mine is new.
  • [x] When the request is meant for an existing plugin, I've added its name to the title.

Is your feature request related to a problem? Please describe. I have been troubleshooting an issue with applications I run via this plugin. The cause of my issue is that HTTP headers containing an underscore are being ignored and not passed upstream. This is the default behavior of nginx. I can correct the problem by manually editing the server block: server { ... underscores_in_headers on; ... }

Describe the solution you'd like I would like to see an Nginx > HTTP Server form checkbox that would allow users to enable this directive. In addition, update the templating to add this server block directive.

Describe alternatives you've considered After some reading, it is taboo to have underscores in your HTTP header.

  • I'm in communication with my app developer to end this practice.
  • For now, I will manually configure the server in opnsense_stream_vhost_plugins
  • maybe try os-haproxy

Additional context nginx docs: underscores in headers.

hursjohn avatar May 09 '23 05:05 hursjohn

Thank you for creating an issue. Since the ticket doesn't seem to be using one of our templates, we're marking this issue as low priority until further notice.

For more information about the policies for this repository, please read https://github.com/opnsense/plugins/blob/master/CONTRIBUTING.md for further details.

The easiest option to gain traction is to close this ticket and open a new one using one of our templates.

OPNsense-bot avatar May 09 '23 05:05 OPNsense-bot

Thank you for creating an issue. Since the ticket doesn't seem to be using one of our templates, we're marking this issue as low priority until further notice.

For more information about the policies for this repository, please read https://github.com/opnsense/plugins/blob/master/CONTRIBUTING.md for further details.

The easiest option to gain traction is to close this ticket and open a new one using one of our templates.

I updated using one of your templates.

hursjohn avatar May 09 '23 05:05 hursjohn

I had to edit /usr/local/etc/nginx/nginx.conf Then in the server bock for the http server you wish to enable this on you add the directive as described in the nginx documentation and my original post. after making the change restart the nginx service "service nginx restart". This manual change will be overwritten the next time opensense generates a config file.

hursjohn avatar Sep 26 '24 21:09 hursjohn