zbiljic / tomcat-header-valve

Tomcat 8 custom header valve

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tomcat header valve

This project contains Tomcat Valve that is used to inject custom header to all responses on Tomcat server.

Custom header name and value can be set through environment variables. To change the header name set the THI_HEADER_NAME, and to change the header value set the THI_HEADER_VALUE environment variable.

Requirements

Building

To build the library run mvn package. This will build the library, and produce target/thv.jar file which will contain Tomcat header valve from this project.

To build the custom Docker image run make pack command which creates new Docker image from the tomcat:8.0, and adds this project's JAR to Tomcat 'lib' directory, and also sets custom conf/context.xml file which configures Tomcat header valve.


Copyright © 2017 Nemanja Zbiljić

About

Tomcat 8 custom header valve

License:Apache License 2.0


Languages

Language:Java 71.0%Language:Makefile 29.0%