|
Page Edited :
WICKET :
Obfuscating urls
Obfuscating urls has been edited by Doug Leeper (Aug 03, 2007). Content:Table of contents How to obfuscate/encrypt a wicket urlFrom time to time users ask how to obfuscate wicket urls. Instead of myApp?component=1&version=0&interface=IRedirectListener they asked for myApp?sdf897sD879ddfD8... and myApp/sdf897sD879ddfD8 and many more. Due to varying requirements such as being Google and/or cluster compliant we decided to provide "hooks" build into the core to allow for virtually any obfuscating alogrithm to be implemented by wicket users. Hopefully users will contribute their implementations back to the project. Classes involved in encrypting and decrypting URLs are WebResponse and WebRequest. The default implementations provided by Wicket don't encrypt the URL at all, but subclasses (currently provided by core as well) like WebResponseWithCryptedUrl and WebRequestWithCryptedUrl do. In order for your application to use them you must subclass WebApplication.newWebRequest() and WebApplication.newWebResponse() like in the snippet shown below. Note, this changed slightly in Wicket 1.2 and 1.3, as can be seen by comparing the fragments below: Wicket 1.3Wicket 1.3+ protected IRequestCycleProcessor newRequestCycleProcessor() { return new WebRequestCycleProcessor() { protected IRequestCodingStrategy newRequestCodingStrategy() { return new CryptedUrlWebRequestCodingStrategy(new WebRequestCodingStrategy()); } }; }
|
Unsubscribe or edit your notifications preferences
