Route can be null.

This commit is contained in:
James Cole 2019-01-27 18:24:11 +01:00
parent e482b079df
commit 968505ac0e

View File

@ -59,8 +59,9 @@ class SecureHeaders
"img-src 'self' data: https://api.tiles.mapbox.com",
"manifest-src 'self'",
];
$route = $request->route()->uri;
if($route !== 'oauth/authorize') {
$route = $request->route();
if (null !== $route && $route->uri !== 'oauth/authorize') {
$csp[] = "form-action 'self'";
}