开发者

imitate iframe coming from another domain

开发者 https://www.devze.com 2023-01-12 01:22 出处:网络
I am trying to develop a small web application which will consist of one web applicaiton using an iframe from another domain. I am trying to test this on my local machine, and for this I need to imita

I am trying to develop a small web application which will consist of one web applicaiton using an iframe from another domain. I am trying to test this on my local machine, and for this I need to imitate as if the iframe is coming from another domain (while it's actually on the same domin as the other web application - my computer). Can this be done? If so, how?

Thank y开发者_运维百科ou


Test it through a local http server (just in case your were accesing to the local files).

Define 2 different vhosts in your http server.

Edit your etc/hosts file to add:

127.0.0.1 domain1.com 
127.0.0.1 domain2.com

So now you have 2 different sites, but running on the same computer.

0

精彩评论

暂无评论...
验证码 换一张
取 消