Overview

This plugin provides an implementation of the Server interface using the Undertow server.

Installation

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>0.9.52</version>
</dependency>

2. Installing the provided SpincastUndertowPluginModule module to your Guice context.

Plugin class

The class implementing the SpincastPlugin interface is SpincastUndertowPlugin.

Javadoc

Configuration

You can bind a SpincastUndertowConfig component if you want to change some default configurations. The default implementation class for those configurations is SpincastUndertowConfigDefault.

Reverse Proxy

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.