Have you tried some examples here https://www.w3schools.com/tags/tag_iframe.asp
Apr 11, 2017
10
Level 4
iframe and X-Frame-Options
Hi, hope somebody can help me, Im trying to allow some pages to be included in a iframe in another site, example: Facebook, but I can't see to find a way , Im always getting
Multiple 'X-Frame-Options' headers with conflicting values ('*, SAMEORIGIN') encountered when loading 'some url'. Falling back to 'DENY'.
I tried 2 ways:
Using Middleware:
class FrameHeadersMiddleware
{
public function handle($request, Closure $next)
{
$response = $next($request);
//$response->header('X-Frame-Options', 'ALLOWALL');
//$response->header('X-Frame-Options', 'ALLOW FROM https://www.facebook.com');
$response->headers->set('X-Frame-Options', '*');
return $response;
}
}
or maybe theres an easy way to put it directly in the controller:
return view('front.benefits')
->withHeaders('X-Frame-Options', 'ALLOWALL')
->with('somedata', $somedata);
Please, any one have manage to do this, Im using L5.4
Level 4
Hi devwootbit, This is what I got:
#add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";
4 likes
Please or to participate in this conversation.