-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vhost headers interpolate string as variable #2316
Comments
The solution to your problem is literally implemented with a The following is quoting the above section:
|
Thanks for the hint, I will test of that works for my setup :) |
Thanks @chutzimir for your pointers.
And in vhost config file below is output I got :
Using literal we don't need escape, this works like charm. |
Describe the Bug
I am trying to set a header for a vhost I am declaring with hiera.
The header is:
Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/" env=BALANCER_ROUTE_CHANGED
To achieve this, I put the following into the hiera:
This results in:
Header add Set-Cookie "ROUTEID=.e; path=/" env=BALANCER_ROUTE_CHANGED
It seems that the module/template interpolates the variable in the single quoted string resulting in an empty substring. This would make it hard/impossible to use the environment variables functionalities of apache.
I tried several different ways to escape the %{BALANCER_WORKER_ROUTE} part, but had no success.
Maybe there is a way I am not aware of? Help is much appreciated.
Expected Behavior
I expected the apache module to set the header correctly without interpolating the string before writing it into the file.
Steps to Reproduce
Environment
Additional Context
If there is a way to correctly escape or configure variables in headers, it is not really apparent from the docs. Maybe there needs to be a bit more documentation, if this is not a bug?
The text was updated successfully, but these errors were encountered: