How to limit display of iframe from an external site to specific domains only

后端 未结 2 1675
一整个雨季
一整个雨季 2020-11-30 08:00

I operate a service where a client\'s content is prepared and displayed in an iframe. The client then copies a rudimentary iframe html tag and pastes it into their web page.

2条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-30 08:25

    you can use an .htaccess (assuming the original content is on an Apache server) to limit the access to a specific IP.

    Or, if the page is a PHP, you could limit it to a specific domain, like this:

        
    

提交回复
热议问题