【问题标题】:Content security policy not coming on 301 http-to-https redirect301 http-to-https 重定向上没有内容安全策略
【发布时间】:2020-12-13 00:09:39
【问题描述】:

我正在使用 dispatcher-cnfig 为我的 AEM 站点进行 httphttps 重定向。但我没有看到 301 重定向出现“内容安全策略”。在接下来的 200 次通话中,该网站现在位于“https”上。

有什么建议让 Content-security-policy 在 301-redirect 调用中也被调用?

提前致谢。

【问题讨论】:

  • 301 重定向中是否有任何内容可以强制执行安全策略?
  • 您找到解决方案了吗?
  • 我没有找到解决方案。 @ronnyfm
  • @HalvorSakshaug,例如 www.google.com 现在它被重定向到 www.google.com/newUrl 。因此,内容是从新网址提供的。这是你问的吗?
  • 重定向应该只是标题,没有内容,也不需要内容安全策略。如果发送没有意义,框架可能会忽略它。 Final 200 有内容,包含它是有意义的。

标签: apache aem content-security-policy dispatcher http-redirect


【解决方案1】:

我能够让 content-security-policy 处理 301 重定向。

之前 content-security 标头位于 <Directory /> 下,我将其移至 <IfModule mod_headers.c> 下。这对我有用。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-02-10
    • 2015-09-17
    • 2021-10-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-10-12
    相关资源
    最近更新 更多