繁体   English   中英

有什么用 <security-constraint> 在Google应用程序引擎GWT Java中的web.xml中

[英]What's is the use of <security-constraint> in web.xml in Google app engine GWT Java

我正在使用Google App Engine上使用GWT Java的项目。 我想使用https访问我的应用程序,以便可以使用“ myapp-dot-appspot.com”访问我的应用程序。 但是,我想知道什么是:

<security-constraint>
        <web-resource-collection>
            <web-resource-name>profile</web-resource-name>
            <url-pattern>/profile/*</url-pattern>
        </web-resource-collection>
        <user-data-constraint>
            <transport-guarantee>CONFIDENTIAL</transport-guarantee>
        </user-data-constraint>
    </security-constraint>

在web.xml中进行配置。

这意味着:

使用HTTP(非安全)对传输保证为机密的URL的请求将使用HTTPS自动重定向到同一URL。

因此,所有对http://myapp.appspot.com/profile/%anything%的请求都将重定向到https://myapp.appspot.com/profile/%anything%

查看文档: https : //cloud.google.com/appengine/docs/java/config/webxml#Secure_URLs

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM