File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -42,8 +42,24 @@ for security reasons, as users could easily be tricked
4242by embeding the original site on a malicious page.
4343
4444Some proxies disallow iframes by default for this reason.
45- You can use https://iframetester.com/ to check, if the site is allowing iframes.
46- If you manage all of your own applications, you can usually change that.
45+ You can use https://iframetest.com to check, if the site is allowing iframes.
46+
47+ If you manage all of your own applications, you can usually change that by configuring
48+ the appropriate headers (such as ` X-Frame-Options ` or ` Content-Security-Policy ` ) to allow iframes.
49+
50+ For example, to allow your site to be embedded in iframes from specific domains:
51+
52+ ** Apache (.htaccess or httpd.conf):**
53+ ``` apache
54+ Header set Content-Security-Policy "frame-ancestors 'self' https://trusted-domain.com"
55+ Header set X-Frame-Options "ALLOW-FROM https://trusted-domain.com"
56+ ```
57+
58+ ** Nginx:**
59+ ``` nginx
60+ add_header Content-Security-Policy "frame-ancestors 'self' https://trusted-domain.com";
61+ add_header X-Frame-Options "ALLOW-FROM https://trusted-domain.com";
62+ ```
4763
4864### Example URLs
4965
You can’t perform that action at this time.
0 commit comments