Недавно мы заметили, что наша контент-безопасная политика (CSP), определенная в файле .htaccess, не вступает в силу. После нескольких часов отладки мы определили проблему: Backslash (\) непосредственно над директивой набора заголовков.# \
#Header add Content-Security-Policy "default-src 'none';"
< /code>
и 2 рабочие образцы: < /p>
# whatever just no backslash
Header add Content-Security-Policy "default-src 'none';"
< /code>
# or with \ but with empty line inbetween
Header add Content-Security-Policy "default-src 'none';"
< /code>
Is it correct to assume that a backslash (\) inside a comment (#) would cause the configuration to continue on the next line? From my understanding, a comment should only affect the current line.
This is on WinServer 2022 with Apache 2.6.2 from ApacheLounge.
Подробнее здесь: https://stackoverflow.com/questions/796 ... e-comments