X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/a6633642232efd164d4708967ab59e498fbff896..refs/pull/2890/head:/app/Http/Middleware/ControlIframeSecurity.php diff --git a/app/Http/Middleware/ControlIframeSecurity.php b/app/Http/Middleware/ControlIframeSecurity.php index cc8034413..11d9e6d4c 100644 --- a/app/Http/Middleware/ControlIframeSecurity.php +++ b/app/Http/Middleware/ControlIframeSecurity.php @@ -3,7 +3,6 @@ namespace BookStack\Http\Middleware; use Closure; -use Symfony\Component\HttpFoundation\Response; /** * Sets CSP headers to restrict the hosts that BookStack can be @@ -15,8 +14,9 @@ class ControlIframeSecurity /** * Handle an incoming request. * - * @param \Illuminate\Http\Request $request - * @param \Closure $next + * @param \Illuminate\Http\Request $request + * @param \Closure $next + * * @return mixed */ public function handle($request, Closure $next) @@ -31,6 +31,7 @@ class ControlIframeSecurity $response = $next($request); $cspValue = 'frame-ancestors ' . $iframeHosts->join(' '); $response->headers->set('Content-Security-Policy', $cspValue); + return $response; } }