Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
    <New id="httpConfig" class="org.eclipse.jetty.server.HttpConfiguration">
      <Set name="secureScheme"><Property name="jetty.httpConfig.secureScheme" default="https" /></Set>
      <Set name="securePort"><Property name="jetty.httpConfig.securePort" deprecated="jetty.secure.port" default="8443" /></Set>
      <!-- more settings here that have been excluded for brevity -->
      <Set name="responseCookieCompliance"><Call class="org.eclipse.jetty.http.CookieCompliance" name="valueOf"><Arg><Property name="jetty.httpConfig.responseCookieCompliance" default="RFC6265"/></Arg></Call></Set>
      <Set name="multiPartFormDataCompliance"><Call class="org.eclipse.jetty.server.MultiPartFormDataCompliance" name="valueOf"><Arg><Property name="jetty.httpConfig.multiPartFormDataCompliance" default="RFC7578"/></Arg></Call></Set>
      <Call name="addCustomizer">
        <Arg><New class="org.eclipse.jetty.server.ForwardedRequestCustomizer"/></Arg>
      </Call>
    </New>
Info

Note: as of Weave 2.6.8 this is done by default on a new installation, if you’ve upgraded from a previous release then you may still have to edit jetty.xml.

Reverse Proxy Requirements
Warning

The Jetty forward request customizer relies upon the X-Forwarded-Host and X-Forwarded-Proto headers to be set correctly in the reverse proxy that is setup in front of Jetty/Weave, be that Apache, IIS, NetScaler, nginx, haproxy, traefik, etc. This configuration change just tells Jetty to make use of those headers, it does not ensure that those headers have been set by the reverse proxy, it is your job to ensure that the reverse proxy is setup to do that.

Info

Note: as of Weave 2.6.8 this is done by default on a new installation, if you’ve upgraded from a previous release then you may still have to edit jetty.xml.

Docker

When Weave is run as a Docker container it does the reverse of the default installation. Rather than running Weave within Jetty it runs Jetty within Weave (by including additional Jetty related plugins in the …\weave\platform\plugins directory) and this configuration (out of the box) does not use the same configuration files used when running Weave embedded in Jetty. So to make it easier to perform the configuration of the embedded Jetty plugins to correctly parse the required reverse proxy headers, Weave provides a custom plugin to perform the required changes. Currently this has to be enabled manually by you but that may change in the future.

...