{"action":"created","issue":{"url":"https://api.github.com/repos/jdauphant/ansible-role-nginx/issues/226","repository_url":"https://api.github.com/repos/jdauphant/ansible-role-nginx","labels_url":"https://api.github.com/repos/jdauphant/ansible-role-nginx/issues/226/labels{/name}","comments_url":"https://api.github.com/repos/jdauphant/ansible-role-nginx/issues/226/comments","events_url":"https://api.github.com/repos/jdauphant/ansible-role-nginx/issues/226/events","html_url":"https://github.com/jdauphant/ansible-role-nginx/issues/226","id":334097371,"node_id":"MDU6SXNzdWUzMzQwOTczNzE=","number":226,"title":"add_header X-XSS-Protection is causing problems","user":{"login":"timorunge","id":1560363,"node_id":"MDQ6VXNlcjE1NjAzNjM=","avatar_url":"https://avatars1.githubusercontent.com/u/1560363?v=4","gravatar_id":"","url":"https://api.github.com/users/timorunge","html_url":"https://github.com/timorunge","followers_url":"https://api.github.com/users/timorunge/followers","following_url":"https://api.github.com/users/timorunge/following{/other_user}","gists_url":"https://api.github.com/users/timorunge/gists{/gist_id}","starred_url":"https://api.github.com/users/timorunge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timorunge/subscriptions","organizations_url":"https://api.github.com/users/timorunge/orgs","repos_url":"https://api.github.com/users/timorunge/repos","events_url":"https://api.github.com/users/timorunge/events{/privacy}","received_events_url":"https://api.github.com/users/timorunge/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-20T14:12:39Z","updated_at":"2018-06-20T20:07:51Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"If you're adding an header with the following format:\r\n\r\n`- add_header X-XSS-Protection \"1; mode=block\"`\r\n\r\nIt will cause a problem for the corresponding site. The output in the site.conf will be like:\r\n\r\n```\r\n   add_header X-XSS-Protection \"1;\r\n       mode=block\";\r\n```\r\n\r\nThe problem is the regex in `site.conf.j2`: \r\n\r\n```\r\n{% if v != \"\" %}{{ v.replace(\";\",\";\\n      \").replace(\" {\",\" {\\n      \").replace(\" }\",\" \\n   }\\n\") }}{% if v.find('{') == -1%};\r\n```\r\n\r\nBut actually I've no real idea how to fix this. :("},"comment":{"url":"https://api.github.com/repos/jdauphant/ansible-role-nginx/issues/comments/398879784","html_url":"https://github.com/jdauphant/ansible-role-nginx/issues/226#issuecomment-398879784","issue_url":"https://api.github.com/repos/jdauphant/ansible-role-nginx/issues/226","id":398879784,"node_id":"MDEyOklzc3VlQ29tbWVudDM5ODg3OTc4NA==","user":{"login":"jdauphant","id":1238254,"node_id":"MDQ6VXNlcjEyMzgyNTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/1238254?v=4","gravatar_id":"","url":"https://api.github.com/users/jdauphant","html_url":"https://github.com/jdauphant","followers_url":"https://api.github.com/users/jdauphant/followers","following_url":"https://api.github.com/users/jdauphant/following{/other_user}","gists_url":"https://api.github.com/users/jdauphant/gists{/gist_id}","starred_url":"https://api.github.com/users/jdauphant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdauphant/subscriptions","organizations_url":"https://api.github.com/users/jdauphant/orgs","repos_url":"https://api.github.com/users/jdauphant/repos","events_url":"https://api.github.com/users/jdauphant/events{/privacy}","received_events_url":"https://api.github.com/users/jdauphant/received_events","type":"User","site_admin":false},"created_at":"2018-06-20T20:07:51Z","updated_at":"2018-06-20T20:07:51Z","author_association":"OWNER","body":"Use the new notation : point 7 on the Readme.\r\n```\r\n- |\r\n  listen 80;\r\n  server_name localhost;\r\n  add_header X-XSS-Protection \"1; mode=block\";\r\n```\r\nThere is multiple issues with the same question if you want more details.\r\nThanks to close the issue if you save your problem"}}
{"actor":{"display_login":"jdauphant"}}