Welcome! Log In Create A New Profile

Advanced

Setting headers

Joó Ádám
September 25, 2015 10:22AM
Hi,

Something that long bothered me, and perhaps has already been
discussed, but I haven’t found anything on it: why is there no way to
set arbitrary headers without using an extension module? I know that
the `add_header` directive has been augmented with the `always` flag
recently, but there’s still no way to freely change headers. I
personally think this is something that one could expect from a web
server.

My specific scenario is that I want to implement server-side
content-negotiation, by conditionally applying an XSL stylesheet and
changing the content-type accordingly. This really made me jump
through hoops using the built-in modules and in specific cases simply
broke. So I gave in and used Headers More, but now, that HTTP/2
support is out, I would like to use it, Thomes Ward’s PPA, however, is
not yet updated, because the Lua module does not build with the new
release (https://twitter.com/teward001/status/646775480931123201), so
my only option would be compiling from source, but I would prefer no
to lose the benefits of package management.

Is there any way to do this within the confines of the built-in modules?


Thanks,
Ádám

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Setting headers

Joó Ádám September 25, 2015 10:22AM

Re: Setting headers

Maxim Dounin September 28, 2015 10:56AM

Re: Setting headers

Joó Ádám September 29, 2015 06:10AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 310
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready