停止从其他域访问网站内容

发布于 2024-09-03 01:42:49 字数 241 浏览 1 评论 0原文

如何停止从其他域访问我的网站内容 [如图像、swf、页面等]? 假设我的服务器中有一个 myflash.swf 文件,其实时 url http://www.mydomain .com/flash/myflash.swf 。我希望任何其他域都无法使用实时 URL 访问此 Flash。有可能吗? 提前致谢。

how can i stop accessing my website content [like image,swf,pages etc.] from other domain?
suppose my server has a myflash.swf file in my server with live url http://www.mydomain.com/flash/myflash.swf . i want this flash can't be accased by any other domain using the live url. is it possable?
thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

榆西 2024-09-10 01:42:49

有一个称为 Referrer 的 HTTP 标头。它通常包含请求下载 swf 的站点。

当 Referrer 值与您的域名名称匹配时,您就可以提供内容。否则拒绝。

There is a HTTP header called referrer. It usually contains the site which request your swf to download.

When the Referrer value matches your domain name name, you can serve the content. Otherwise reject it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文