Revolving around the core of technology
Document ID: | 5334 |
---|---|
Subject: | How to add custom headers in HTTP response |
Creation date: | 1/2/20 11:15 AM |
Last modified on: | 1/2/20 11:17 AM |
Companies often want to add custom headers in HTTP response to make the communication more secure.
There are two types of custom headers:
Parameter in server.properties | Header Name | Header Value |
---|---|---|
use.strict.transport.security.4https |
Strict-Transport-Security | max-age=86400 |
use.x-frame.options |
x-frame-options | SAMEORIGIN |
use.x-xss.protection |
X-XSS-Protection | 1; mode=block |
use.x-content.type.options |
X-Content-Type-Options | nosniff |
use.referrer-policy |
Referrer-Policy | no-referrer |
use.http.public.key.pins |
Public-Key-Pins | Dynamically generated |
no-referrer
to origin
. Add the following lines
in server.properties file.
use.referrer-policy=falseThen, use the CustomHttpHeaders.txt file to specify the new value. (See below).
CustomHttpHeaders.txt
in $INSTALL_DIR\config folder.Cache-Control: no-cache
Do you have a helpful tip related to this document that you'd like to share with other users?