I am on a google app engine project now. In my application I have to allow only https protocol. And I have to restrict other protocols. It should allow https only. I have added the below code in web.xml.
<security-constraint> <web-resource-collection> <web-resource-name>Protected Area</web-resource-name> <url-pattern>/*</url-pattern> </web-resource-collection> <user-data-constraint> <transport-guarantee>CONFIDENTIAL</transport-guarantee> </user-data-constraint> </security-constraint>
But after deploying it works on both the protocols(http and https). How to restrict http?
App Engine is a fully managed, serverless platform for developing and hosting web applications at scale. You can choose from several popular languages, libraries, and frameworks to develop your apps, and then let App Engine take care of provisioning servers and scaling your app instances based on demand.
In Google I/O 2011, Google announced App Engine Backends, which are allowed to run continuously, and consume more memory. The Backend API was deprecated as of March 13, 2014 in favor of the Modules API.
Examples of Google App Engine. One example of an application created in GAE is an Android messaging app that stores user log data. The app can store user messages and write event logs to the Firebase Realtime Database and use it to automatically synchronize data across devices.
It is possible to configure the individual handlers to require HTTPS in the app.yaml file in the WEB-INF folder as described here: Java Application Configuration Using app.yaml - Google App Engine.
You just have to add these two words to your app.yaml
file under the appropriate url
entry:secure: always
For example:
- url: .* script: main.app secure: always
Then if a user tries to access the URL with HTTP she will be automatically redirected to HTTPS. Pretty cool.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With