【问题标题】:Google App Engine - Does not redirect HTTP traffic to HTTPSGoogle App Engine - 不将 HTTP 流量重定向到 HTTPS
【发布时间】:2013-03-20 15:51:36
【问题描述】:

我最近在我的 Google App Engine Java 应用上安装了 GoDaddy 证书。 一切顺利,直接访问时 HTTPS 链接正常工作。

当我尝试在 Web.xml 中配置所有需要保护的链接时,我遇到了重定向问题。由于某种原因,GAE 承认链接应该是安全的,但它未能将它们重定向到 HTTPS(因为它应该)。

我在 Web.xml 中使用了如下定义:

  <security-constraint>
     <display-name>SecurityConstraint</display-name>
      <web-resource-collection>            
         <url-pattern>/Login.html</url-pattern>
        <url-pattern>/Register.html</url-pattern>
        <url-pattern>/Billing.html</url-pattern>
        <url-pattern>/PurchaseCredit.html</url-pattern>
        <url-pattern>/PastPurchases.html</url-pattern>                                              
      </web-resource-collection>
      <user-data-constraint>
        <transport-guarantee>CONFIDENTIAL</transport-guarantee>
      </user-data-constraint>
  </security-constraint>

示例:当我尝试到达时

       http://MyDomain/Login.html

我得到:HTTP 错误 403(禁止):服务器拒绝完成请求。

代替:

       https://MyDomain/Login.html

【问题讨论】:

    标签: google-app-engine


    【解决方案1】:

    似乎当我关闭 Google PageSpeed 后问题就解决了。

    我刚刚看到 Google 发布了有关 PageSpeed 和 HTTPS 的特别通知

    https://developers.google.com/speed/docs/pss/faq

    看来要整合这两者,您必须通过电子邮件向他们发送进一步的说明。

    不管怎样,我很高兴我找到了这个,希望它能为你们节省很多时间。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-02-01
      • 1970-01-01
      • 2017-08-04
      • 1970-01-01
      • 2021-04-26
      • 2014-04-27
      • 1970-01-01
      相关资源
      最近更新 更多