Skip to content

Commit

Permalink
Remove for exact user agent check
Browse files Browse the repository at this point in the history
  • Loading branch information
MrKampf committed Aug 1, 2023
1 parent 25e2d17 commit 1bffae9
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/Listener/CSPListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,8 @@ public function handle(Event $event): void {
}

//This is the exception for specific user agents
if (str_contains($userAgent, 'Edg') ||
str_contains($userAgent, 'MSIE')) {
//Add only when request url is / or /login
if ($this->request->getRequestUri() === '/' || $this->request->getRequestUri() === '/login') {
$policy->addAllowedScriptDomain("'unsafe-inline'");
}
if ($this->request->getRequestUri() === '/' || $this->request->getRequestUri() === '/login') {
$policy->addAllowedScriptDomain("'unsafe-inline'");
}

//This add the trusted font urls to the CSP
Expand Down

0 comments on commit 1bffae9

Please sign in to comment.