是否可以在html中使用nginx将其他域屏蔽到我的域名中,例如:
<iframe src="https://example.com/embed/abcd" frameborder="0" width="640" height="450" scrolling="no"></iframe>然后我想像这样向我的用户展示
<iframe src="http://example2.com/embed/abcd" frameborder="0" width="640" height="450" scrolling="no"></iframe>这和nginx有关吗?
我尝试过使用nginx rewrite和proxy_pass,但是它似乎不起作用。
发布于 2017-07-27 09:32:18
使用Nginx的ngx_http_sub_模块模块非常简单。
sub_filter_types text/html; # optional
sub_filter '//example.com' '//example2.com';如果出于性能原因,最好将此类语句放在location块中。
https://serverfault.com/questions/865420
复制相似问题