Answer the question
In order to leave comments, you need to log in
How to allow iframe to be used only for certain domains?
Hello.
The essence of the problem.
About a month ago I began to notice that some sites host my site in an iframe, so I had to cut it down, as tons of external links from homosites began to appear.
I wrote a header to prohibit the use of iframes on third-party sites add_header X-Frame-Options DENY;
. And then I ran into a problem. There is an iframe application in VK, and you need it to work.
How to be? Is it possible to list the allowed domains?
Answer the question
In order to leave comments, you need to log in
Try ALLOW-FROM:
add_header X-Frame-Options "ALLOW-FROM https://vk.com/";
And what do you want to do?
You wrote "If none of the above routes matched, then send to the page /catalog/:categoryId".
I don't see any point in this.
Write redirectTo: '/catalog/1', it will work out the first route with categoryId 1, and if you need to substitute something instead of 1 at the stage of configuring the application, which is transmitted from the server, then you can write JS like this at the template output stage
Connect this module to your application and then you can do
servicesCatalog.config(function ($routeProvider, $compileProvider, INITIAL_CATEGORY_ID) {
//....
otherwise({
redirectTo: '/catalog/'+INITIAL_CATEGORY_ID
});
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question