For me to start using a function in Yandex Metrica, i have to make sure that my site is not protected against showing in a frame. How do i go about doing that?
This is what Yandex Metrica told me:
Hello, Dale!
As we see, your site is using the protect against showing in a frame (the site returns a header X-Frame-Options: SAMEORIGIN ).
If your site is protected from being shown in an iframe (the server settings use the X-Frame-Optionsheader), the collected data won't be available for viewing. In order to view data about site traffic, you need to add an exception to the server settings for the webvisor.com domain and its subdomains, as well as for your site domain.
How to show my site in a frame
Hi,
For me to start using a function in Yandex Metrica, i have to make sure that my site is not protected against showing in a frame. How do i go about doing that?
This is what Yandex Metrica told me: Hello, Dale!
As we see, your site is using the protect against showing in a frame (the site returns a header
X-Frame-Options: SAMEORIGIN
).If your site is protected from being shown in an iframe (the server settings use the
X-Frame-Options
header), the collected data won't be available for viewing. In order to view data about site traffic, you need to add an exception to the server settings for the webvisor.com domain and its subdomains, as well as for your site domain.Use the regular expression
If you use nginx, add the following exceptions to your configuration:
where yourdomain.com is the site's domain name. Use your site's domain zone (it may differ from .com).
Thanks, Dale
I would look into CSP & frame-ancestors. Allows you to define multiple domains to allow loading through iframes. This can be managed in the web.config
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/frame-ancestors
https://stackoverflow.com/questions/37992225/config-your-iis-server-to-use-the-content-security-policy-header
Look in your web.config file for a section that looks something like this:
Now remove these two lines from it:
That should do it.
is working on a reply...