This plugin provides an implementation of the Server interface using the Undertow server.
If you use the spincast-default artifact and the standard Bootstrapper,
this plugin is already installed by default so you have nothing to do!
If you start from scratch, using the spincast-core artifact, you can use the
plugin by :
1. Adding this Maven artifact to your project:
<dependency>
<groupId>org.spincast</groupId>
<artifactId>spincast-plugins-undertow</artifactId>
<version>2.2.0</version>
</dependency>
2. Installing the provided SpincastUndertowPluginModule module to your Guice context.
The class implementing the SpincastPlugin interface is SpincastUndertowPlugin.
You can bind a SpincastUndertowConfig component if you want to change some default configurations. The default implementation class for those configurations is SpincastUndertowConfigDefault.
If you use a reverse proxy, such as Nginx or
Apache, make sure it sets those HTTP headers
if the forwarded scheme, host or port are different then the
original ones :
X-Forwarded-Proto: The original scheme (http or https)
X-Forwarded-Host: The original host.
X-Forwarded-Port: The original port.
The Spincast Undertow plugin will use those headers to provide the correct information when getFullUrlOriginal() is called.