So I have this app running on openshift that uses the wildfly 8.1 cartridge. I would like to force all urls to go through https instead of http.
Https is working fine, but I can also access the same pages using http. Which is what I want to disable.
I've found this KB article: https://www.openshift.com/kb/kb-e1044-how-to-redirect-traffic-to-https but this doesn't describe the configuration for wildfly specifc.
This is my standalone.xml config from wildfly on openshift: http://pastebin.com/hg7WY5Uj
Fixed.
Added the following to my web.xml:
This results in a redirect to https for every url. But the port is 8443. To use the default port 443 I've adjusted my config/standalone.xml:
In the socket-binding-group change:
to