Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <cfcomponent>
- <cffunction name="onApplicationStart" returnType="boolean" output="false">
- <cfreturn true />
- </cffunction>
- <cffunction name="onRequestStart" returnType="boolean" output="true">
- <cfargument name="targetPage" type="string" required="true" />
- <cfscript>
- var request_network = listDeleteAt( cgi.remote_addr, 4, "." );
- var allowed_networks = "127.0.0,192.168.0,10.0.0";
- if( listFind( allowed_networks, request_network ) ) {
- return true;
- }
- else {
- abort();
- }
- </cfscript>
- </cffunction>
- </cfcomponent>
Add Comment
Please, Sign In to add comment