Bug #2891
closedsetenv.add-response-header does not work with url.redirect
Description
Set-Cookie header does not appear with url.redirect. A normal use with dirlisting works fine.
$SERVER["socket"] == ":8888" {
setenv.add-response-header = ( "Set-Cookie" => "Secure" )
url.redirect = (".*" => "https://test.env.fory.com$0")
}
curl -I http://10.0.2.58:8888
HTTP/1.1 301 Moved Permanently
Location: https://test.env.fory.com/
Date: Thu, 14 Jun 2018 00:32:05 GMT
Server: lighttpd/1.4.49
Updated by gstrauss over 6 years ago
- Status changed from New to Invalid
A simple test works just fine. Did you load the modules in the right order for mod_setenv to apply before mod_redirect generates a response?
server.document-root = "/valid/path/here" server.modules = ( "mod_setenv", "mod_redirect" ) $SERVER["socket"] == ":8888" { setenv.add-response-header = ( "Set-Cookie" => "Secure" ) url.redirect = (".*" => "https://test.env.fory.com$0") }
Updated by fory over 6 years ago
Yes, Like I said, the simple dirlisting works fine. It does not work with url.redirect.
Updated by fory over 6 years ago
That was it. I needed to move "mod_setenv" before "mod_redirect". Thx for the tip.
Also available in: Atom