@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | 'max_age' => 1800, |
| 213 | 213 | 'endpoints' => [[ |
| 214 | 214 | 'url' => $this->getReportURI(), |
| 215 | - ],], |
|
| 215 | + ], ], |
|
| 216 | 216 | 'include_subdomains' => $this->getIncludeSubdomains(), |
| 217 | 217 | ]; |
| 218 | 218 | return json_encode($header); |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | { |
| 223 | 223 | if ($this->isReporting()) { |
| 224 | 224 | // Add or update report-uri directive. |
| 225 | - if($cspHeader) { |
|
| 225 | + if ($cspHeader) { |
|
| 226 | 226 | if (strpos($cspHeader, 'report-uri')) { |
| 227 | 227 | $cspHeader = str_replace('report-uri', $this->getReportURIDirective(), $cspHeader); |
| 228 | 228 | } else { |
@@ -228,8 +228,7 @@ |
||
| 228 | 228 | } else { |
| 229 | 229 | $cspHeader = rtrim($cspHeader, ';') . "; {$this->getReportURIDirective()};"; |
| 230 | 230 | } |
| 231 | - } |
|
| 232 | - else { |
|
| 231 | + } else { |
|
| 233 | 232 | $cspHeader = $this->getReportURIDirective() . ';'; |
| 234 | 233 | } |
| 235 | 234 | // Add report-to directive. |