When hovering the little `(i)` in the "Header Operations", you are presented with:
But the webserver doesn't respect any of these.
The Documentation of OpenLiteSpeed is severely lacking, and doesn't actually offer any examples on how to use the conditions or env vars in any way.
Code:
Specifies additional response/request headers to be added. Multiple header directives can be added with one directive per line. "NONE" can be used to disable parent header inheritance. If no directive is provided 'Header' is assumed.
Syntax: [Header]|RequestHeader [condition] set|append|merge|add|unset header [value] [early|env=[!]variable]
Example: set Cache-control no-cache
append Cache-control no-store
Header set My-header cust_header_val
RequestHeader set My-req-header cust_req_header_val
- The
conditionis supposed to be "always" or "onsuccess", as per the Apache documentation. But setting this like:
Will actually add a header called ONSUCCESS:Code:Header onsuccess set X-Foo "Bar"
Code:# curl -IXGET https://...... onsuccess: set X-Foo "Bar" - The
envpart is completely ignored, or always seem to be true, no matter if that environment variable exists or not. For example:
Header set X-Foo "Bar" env=MOO
The header will ALWAYS be set, no matter if theMOOvariable exists or not
The Documentation of OpenLiteSpeed is severely lacking, and doesn't actually offer any examples on how to use the conditions or env vars in any way.