Commit 389b5eba authored by Romain Courteaud's avatar Romain Courteaud

Do not warn about missing CSP in case of redirection

parent 6aa7f666
...@@ -731,7 +731,12 @@ class WebBot: ...@@ -731,7 +731,12 @@ class WebBot:
if ( if (
"Content-Security-Policy" "Content-Security-Policy"
not in network_change["http_header_dict"] not in network_change["http_header_dict"]
) and (
network_change["status_code"]
not in (301, 302, 303)
): ):
# In case of redirection, CSP is not needed
# as the browser will not render the page
result_dict["warning"].append( result_dict["warning"].append(
{ {
"text": "(No Content-Security-Policy header) %s" "text": "(No Content-Security-Policy header) %s"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment