问题
<a href="#popupVideo" data-rel="popup" data-position-to="window" class="ui-btn ui-corner-all ui-shadow ui-btn-inline">Launch video player</a>
<div data-role="popup" id="popupVideo" data-overlay-theme="b" data-theme="a" data-tolerance="15,15" class="ui-content">
<iframe src="https://xxxx.net" width="497" height="298" seamless=""></iframe>
</div>
I am trying to add an iframe in the pop up window but its showing me the error In a frame because it set 'X-Frame-Options' to 'SAMEORIGIN, SAMEORIGIN'.
What to do now ?
回答1:
Solved it by changing the file httpd.conf
<IfModule headers_module>
<IfVersion >= 2.4.7 >
Header always setifempty X-Frame-Options SAMEORIGIN
</IfVersion>
<IfVersion < 2.4.7 >
Header always merge X-Frame-Options SAMEORIGIN
</IfVersion>
RequestHeader unset Proxy
</IfModule>
回答2:
Looks like https://xxxx.net
's owner doesn't want anyone to iFrame his resources on their websites.
If that domain is yours and you want to include its content into another your website, you should whitelist it using ALLOW-FROM https://your-domain.com
.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options
来源:https://stackoverflow.com/questions/40522747/in-a-frame-because-it-set-x-frame-options-to-sameorigin-sameorigin