Here is a complete Wowza Module to deny hotlinking server-side. Compile this in the Wowza IDE:
package com.lakesidetechnical.security;
import com.wowza.wms.amf.*;
import com.wowza.wms.client.*;
import com.wowza.wms.module.*;
import com.wowza.wms.request.*;
public class HotlinkDenial extends ModuleBase {
public void onConnect(IClient client, RequestFunction function,
AMFDataList params) {
getLogger().info("onConnect: " + client.getClientId());
String pageUrl = client.getProperties().getPropertyStr("connectpageUrl").toLowerCase();
String domainLock = client.getAppInstance().getProperties().getPropertyStr("domainLock").toLowerCase();
boolean reject = !pageUrl.startsWith(domainLock);
if (reject)
client.rejectConnection();
}
}
Then add this Module last in the Modules section of your Application.xml
Hotlink Denial
Hotlink Denial Module
com.lakesidetechnical.security.HotlinkDenial
(note that I cannot get rid of the space between the “a” and “l” in HotlinkDenial above, be sure to edit that out)
And this Property section to the Properties section below the Modules in the Application.xml:
domainLock
This zip file includes a compiled jar file:
http://wms.lakesidetechnical.com/hotlinkdenial.zip
Richard