[ACCEPTED]-https only in google app engine-maven-gae-plugin
It is possible to configure the individual 7 handlers to require HTTPS in the app.yaml 6 file in the WEB-INF folder as described 5 here: Java Application Configuration Using app.yaml - Google App Engine.
You just have to add these two words 4 to your app.yaml
file under the appropriate url
entry:
secure: always
For 3 example:
- url: .*
script: main.app
secure: always
Then if a user tries to access the 2 URL with HTTP she will be automatically 1 redirected to HTTPS. Pretty cool.
If you want to stick with "web.xml" rather 3 than using the "app.yaml" option 2 (which will overwrite your web.xml & appengine-web.xml 1 files at deploy time), you can add in:
<security-constraint>
<web-resource-collection>
<web-resource-name>everything</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
Reference: https://cloud.google.com/appengine/docs/java/config/webxml#Security_and_Authentication
Are you using your own domain? At present, GAE 4 supports SSL for *.appspot.com domains only. They 3 have been promising SSL support for non-appspot domains 2 for some time now and we're all waiting 1 for news on that front.
This is for future folks !!!
In java adding the 2 code below in my
web.xml
file worked for me<security-constraint> <web-resource-collection> <web-resource-name>HTTPS redirect</web-resource-name> <url-pattern>/*</url-pattern> </web-resource-collection> <user-data-constraint> <transport-guarantee>CONFIDENTIAL</transport-guarantee> </user-data-constraint> </security-constraint>
For 1 other project add
secure: always
under all urls inapp.yaml
file
Add this to your web.xml file
<security-constraint>
<web-resource-collection>
<web-resource-name>all</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
0
More Related questions
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.