Change the X-Frame-Options to allow all domains

后端 未结 3 554
余生分开走
余生分开走 2021-02-04 00:56

I am trying to use some site of mine as an iframe from a different site of mine.

My problem is- the other site is always consistently changes his IP address

3条回答
  •  伪装坚强ぢ
    2021-02-04 01:35

    Well you can check the ip address of the remote host from the server. You can then send a X-Frame-Options response HTTP header with the value: "Allow-From ip-address", where ip address is the remote ip address that is trying to embed content on your server. This will allow your website to be embedded by all websites that are accessed using an ip address from the browser.

    Another option is to embed the content in iframe and include the domain name in the iframe source url. The domain name parameter can be read by the server and included in the X-Frame-Options response header.

提交回复
热议问题