Merge pull request #9541 from misilot/change-var-aws-public-url
Change from ENV to config value for PUBLIC_AWS_URL
This commit is contained in:
commit
d54434fdf7
1 changed files with 7 additions and 2 deletions
|
@ -103,8 +103,13 @@ class SecurityHeaders
|
|||
$csp_policy[] = "connect-src 'self'";
|
||||
$csp_policy[] = "object-src 'none'";
|
||||
$csp_policy[] = "font-src 'self' data:";
|
||||
$csp_policy[] = "img-src 'self' data: ".config('app.url').' '.env('PUBLIC_AWS_URL').' https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com';
|
||||
$csp_policy = implode(';', $csp_policy);
|
||||
$csp_policy[] = "img-src 'self' data: ".config('app.url').' '.env('PUBLIC_AWS_URL').' https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com";
|
||||
|
||||
if(config('filesystems.disks.public.driver') == 's3') {
|
||||
$csp_policy[] = "img-src 'self' data: ".config('filesystems.disks.public.url');
|
||||
}
|
||||
$csp_policy = join(';', $csp_policy);
|
||||
|
||||
$response->headers->set('Content-Security-Policy', $csp_policy);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue