I`m searching for a way to add a custom header to the HTTP response of the Jetty Server when delivering certain static files. There is a way to do that as it is described here:
https://wiki.eclipse.org/Jetty/Feature/Rewrite_Handler#Embedded_Example
But how can I access the default jetty server instance, or is there another way to achieve this?
guessed
(Mark Clark)
November 29, 2015, 8:31pm
2
If you want to do it statically, then the Jetty configuration file is in:
OH/etc/jetty.xml
You can mod this with whatever you need, presumably you were looking at a HeaderPatternRule
to force a specific response header so some URL pattern.
Thanks for your answer, but I don’t want to do it statically. This header should only be send while a certain addon is loaded (the cometvisu addon). So I am searching for an programatically way to achieve this.