Skip to content

Commit

Permalink
dont return SAMEORIGIN twice
Browse files Browse the repository at this point in the history
  • Loading branch information
alexjustesen committed Nov 12, 2023
1 parent d92a1ec commit 299e163
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion app/Http/Middleware/FrameAllowOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ public function handle(Request $request, Closure $next): Response
{
$response = $next($request);

$response->header('X-Frame-Options', 'ALLOW-FROM '.config('speedtest.allow_embeds'));
if (! blank(config('speedtest.allow_embeds'))) {
$response->header('X-Frame-Options', 'ALLOW-FROM '.config('speedtest.allow_embeds'));
}

return $response;
}
Expand Down
2 changes: 1 addition & 1 deletion config/speedtest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@
/**
* Security
*/
'allow_embeds' => env('ALLOW_EMBEDS', 'SAMEORIGIN'),
'allow_embeds' => env('ALLOW_EMBEDS', null),
];

0 comments on commit 299e163

Please sign in to comment.