1

Quick and dirty fix needed here if possible...

We've been running a bunch of REST services on a Wildfly installation for a few years. The server isn't for public use -- on the main https://ourserver.com page we have a redirect which points wandering users to our main website. It's a very simple standalone config.

But the server has always been HTTPS only. And now thanks to a domain reshuffle, we need to make it possible for users who go to http://ourserver.com without SSL to hit the redirect to ourserver.net. So we basically need to expose just the welcome-content directory on this server over the "http" interface (which was previously firewalled off), while not letting non-SSL users reach any of the webservice subdirectories.

What's the simplest way to ensure that accessing any URL via plain HTTP gets redirected?

1 Answers1

0

You can try adding a filter to the standalone.xml under the subsystem urn:jboss:domain:undertow:4.0

e.g. for http (8080) to https (8443), it would be:

<filter-ref name="http-to-https" predicate="equals(%p,8080)"/>

under the tag filters, you add it:

<rewrite name="http-to-https" target="https://myhttpsurl.com:8443%U" redirect="true"/>
Kurt Agis
  • 1
  • 3