'nginx_sites' semicolon escaping ignores quoted values
milliams opened this issue · 2 comments
If I set nginx_sites
to
nginx_sites:
my_site:
- add_header X-XSS-Protection "1; mode=block"
it is converted in the output to
server {
add_header X-XSS-Protection "1;
mode=block";
}
rather than
server {
add_header X-XSS-Protection "1; mode=block";
which, as far as I can tell is treated by nginx as simply 1
.
This seems to be caused by the code in templates/site.conf.j2
which simply does a
v.replace(";",";\n ")
and ignores whether the semicolon is inside quotation marks.
Hello @milliams,
You can use the new notation.
You can see an example in #151.
Also linked to your experience, if you have an idea to improve the documentation so people will find more easely the new notation in that case: a PR in that sense will be more than welcome :)
(I have multiple ticket with the same problem like #151, #170, ...).
Best regards,
Julien
I think this is all my fault for not doing a thorough enough search before jumping to the issue tracker