vADC Docs

HowTo: Set an HTTP Response Header

by on ‎02-25-2013 12:48 AM - edited on ‎06-09-2015 04:31 PM by PaulWallace (3,289 Views)

Use the http.setResponseHeader() function to set the value of a response header. You can use this function in both request and response rules:


# Mask the 'Server' response header  
http.setResponseHeader( "Server", "Unknown web server" );  
# Work round browser/proxy bugs and prevent caching  
http.setResponseHeader( "Pragma", "no-cache" );  
http.setResponseHeader( "Cache-Control", "no-cache" );  
http.setResponseHeader( "Expires", "0" );  


You can also delete a response header with the http.removeResponseHeader() function.


Read More