You can restrict / allow access to resources by checking ip.
public class IPLocalSecurity extends Controller { @Before public static void checkAccess() throws Exception { if (!request.remoteAddress.matches("192\.168\.1\.*")) { forbidden(); } } }
and use this in the resource controller.
@With(IPLocalSecurity.class) public class IntranetController extends Controller{ .... }
source share