mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-04 03:43:07 +00:00
Fix code for #5493 as suggested by @tjmv
This commit is contained in:
@@ -62,9 +62,16 @@ class SecureHeaders
|
||||
"manifest-src 'self'",
|
||||
];
|
||||
|
||||
$route = $request->route();
|
||||
$route = $request->route();
|
||||
$customUrl = '';
|
||||
$authGuard = (string)config('firefly.authentication_guard');
|
||||
$logoutUrl = (string)config('firefly.custom_logout_url');
|
||||
if ('remote_user_guard' === $authGuard && '' !== $logoutUrl) {
|
||||
$customUrl = $logoutUrl;
|
||||
}
|
||||
|
||||
if (null !== $route && 'oauth/authorize' !== $route->uri) {
|
||||
$csp[] = "form-action 'self'";
|
||||
$csp[] = sprintf("form-action 'self' %s", $customUrl);
|
||||
}
|
||||
|
||||
$featurePolicies = [
|
||||
|
Reference in New Issue
Block a user