I'm running the plantuml.war on a server using jetty-runner. I need to enable the Access-Control-Allow-Origin
header for CORS, but the way I found to do this points to a web.xml or an override-web.xml, which I think are out of my control because I'm using a third-party web-app in jetty-runner. I can't see a way to set this up in jetty.xml.
Is there a way to enable the Access-Control-Allow-Origin
header inside of jetty-runner?
Disclaimer: I got help with the details on this (not my answer 100%). I tested it only under Windows 7 and Windows 8 with Java 7.
In addition to
jetty-runner.jar
, one needs alsojetty-servlets.jar
.Add a file
override-web.xml
as follows:Then make a
jetty-web.xml
contextRun PlantUML's server as follows