Is there a way to add a response header to the return HTML (besides a custom controller)? Specifically I'm needing to add the "Access-Control-Allow-Origin" header to a returned html output.
We use cookies and analytics on our website to support technical features that enhance your user experience.
-
RE: Add a response header
Generally there are two main options for adding custom headers to the response from WebMaker applications.
You can either use a custom XGate Plugin which implements the processOutput method, or add an appropriate Servlet Filter to the published app.
In the case of the Access Control headers though, before writing any custom code I would have a look at the CORS Filter provided by Tomcat, as that may well do what you need.
I hope this helps.
Regards,
Gerard