Recently, we are enabling SSL on our Wildfly instance. We used this StackOverflow answer to configure our Wildfly instance for SSL. This includes the management interface and the webserver itself. Now, to get a better rating in Google search, we want to apply SEO methods for SSL.
We now want to redirect all http traffic to https to comply to Google's specification. We use the following web.xml snippet for this:
This works, however this results in a 302 temporary redirect. To preserve our old score on our URL's, this needs to be a 301 permanent redirect. Is there a way to accomplish this with Wildfly/Undertow/Web.xml ?