【发布时间】:2019-10-25 13:13:22
【问题描述】:
我想将X-Robots-Tag noindex, nofollow 添加到站点的所有 .PDF 文件的 HTTP 响应中,以避免 Google 搜索引擎引用这些文档。
这适用于 Heroku 上带有 Spring boot 2.1 的 Tomcat 8 服务器。过去,我在 Apache Server 上尝试过,noindex 和 nofollow 运行良好。
<Files ~ "\.pdf$">
Header set X-Robots-Tag "noindex, nofollow"
</Files>
【问题讨论】:
标签: java spring-boot tomcat heroku x-robots-tag