new*_*bie 1 java ssl google-app-engine
如何确保用户无法访问google appengine上的http地址?现在使用者可以使用https或http来访问网站,但有没有办法强制用户使用http协议来https网址?
好了,我现在找到了一种方法,将以下元素添加到web.xml中,并且xml应该具有以下xml定义:
<?xml version="1.0" encoding="utf-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee" version="2.5">
<security-constraint>
<web-resource-collection>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
Run Code Online (Sandbox Code Playgroud)
https://developers.google.com/appengine/docs/java/config/webxml#Secure_URLs
| 归档时间: |
|
| 查看次数: |
1325 次 |
| 最近记录: |