Jul 19, 2017

How to change or remove “Server” HTTP header on Glassfish

curl -kv https://localhost > /dev/null
HTTP/1.1 200 OK
Server: GlassFish Server Open Source Edition

It can be both modified or removed altogether. This involves adding a Java property which means that changes made will require a server restart. The magic property is called product.name. You could use the admin console to change this

/opt/glassfish3/bin/asadmin create-jvm-options -Dproduct.name="i88.ca App server 3"
/opt/glassfish3/bin/asadmin restart-domain

Post a Comment

Featured Post

Modern tar recognizes the file format

One command works with any supported compression method. tar xf archive.tar.xz tar xf archive.tar.gz tar xf archive.tar etc. ...