Skip to content

Automatically add and configure a reverse proxy in your carnotzet environments

Notifications You must be signed in to change notification settings

swissquote/carnotzet-extension-reverse-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

Automatically add and configure a reverse proxy in your carnotzet environments

Adds an nginx reverse proxy container in your environment, with automatically generated configuration to forward http requests to all other webapps in the envirvonment

This allows you to avoid cross-domain limitations in browsers.

Usage

<dependency>
	<groupId>com.github.swissquote</groupId>
	<artifactId>carnotzet-extension-reverse-proxy</artifactId>
	<version>${carnotzet-extension-reverse-proxy.version}</version>
</dependency>

Java

register a ReverseProxyExtension object in your CarnotzetConfig (Carnotzet documentation for details)

Maven

<plugin>
	<groupId>com.github.swissquote</groupId>
	<artifactId>zet-maven-plugin</artifactId>
	<version>${carnotzet.version}</version>
	<configuration>
		<extensions>
			<extension>
				<factoryClass>com.github.swissquote.carnotzet.extension.reverse.proxy.ReverseProxyExtensionFactory</factoryClass>
			</extension>
		</extensions>
	</configuration>
	<dependencies>
		<dependency>
			<groupId>com.github.swissquote</groupId>
			<artifactId>carnotzet-extension-reverse-proxy</artifactId>
			<version>${carnotzet-extension-reverse-proxy.version}</version>
		</dependency>
	</dependencies>
</plugin>

Configuration

Docker image

By default, the latest nginx official docker image will be used as reverse proxy. You can override this by using the appropriate constructor when building your ReverseProxyExtension. When configuring through the maven plugin, you may use the nginx.image property.

Context path

By default, the module name is used as contextPath. you can override the contextPath of each webapp in their respective carnotzet.properties file.

http.context.path=/custom-context

Port

By default, the reverse proxy forwards requests to port 80 of each container. you can override the contextPath of each webapp in their respective carnotzet.properties file.

http.port=8080

About

Automatically add and configure a reverse proxy in your carnotzet environments

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages