title: Redirect to https in Quarkus
body: <p>What is the easiest way to redirect from HTTP to HTTPS in Quarkus?</p>
  
  <p>I've searched the config documentation <a href="https://quarkus.io/guides/all-config" rel="nofollow noreferrer">https://quarkus.io/guides/all-config</a> but couldn't find anything.</p>
  
  <p>I tried to add the undertow dependency and a web.xml to force a https connection. The web.xml I added looks like this:</p>
  
  <p><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xmlns="http://java.sun.com/xml/ns/javaee"
           xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
           version="3.0"&gt;
      &lt;security-constraint&gt;
          &lt;web-resource-collection&gt;
              &lt;web-resource-name&gt;All&lt;/web-resource-name&gt;
              &lt;url-pattern&gt;*&lt;/url-pattern&gt;
          &lt;/web-resource-collection&gt;
          &lt;user-data-constraint&gt;
              &lt;transport-guarantee&gt;CONFIDENTIAL&lt;/transport-guarantee&gt;
          &lt;/user-data-constraint&gt;
      &lt;/security-constraint&gt;
  &lt;/web-app&gt;
  </code></p>