I'd like to specify the cache-control header when serving the crossdomain.xml file.

I tried doing a HTTPProvider that builds and sends this file. However it seems that it always takes the file in the conf directory.

Here's my VHost.xml configuration for that HTTPProvider:

And the HTTPProvider Code (is in another package so it doesn't collide with wowza.wms)
public class HTTPCrossdomain extends HTTProvider2Base {
	public void onHTTPRequest(IVHost vhost, IHTTPRequest req, IHTTPResponse resp) {
		if (!doHTTPAuthentication(vhost, req, resp))
		StringBuffer response = new StringBuffer();

		response.append("<?xml version=\"1.0\"?>");
		response.append("<!DOCTYPE cross-domain-policy SYSTEM \"http://www.adobe.com/xml/dtds/cross-domain-policy.dtd\">");
		response.append("<allow-access-from domain=\"*\"/>");
		response.append("<site-control permitted-cross-domain-policies=\"all\"/>");

		try {
			resp.setHeader("Content-Type", "text/xml");
			resp.setHeader("Cache-Control", "foo");
			OutputStream out = resp.getOutputStream();
			byte[] outBytes = response.toString().getBytes();
		} catch (Exception e) {
					"ERROR: " + e.toString());


I've tried removing the file at the conf directory but then the server responds with 404. It doesn't take in consideration the HTTPProvider one :/

Any help?