Created
July 24, 2017 00:05
-
-
Save with-heart/3b98e76d834e5ae82054733cc048e3aa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override fun run(): Any? { | |
val ctx = RequestContext.getCurrentContext() | |
val uri = ctx.request.requestURI | |
val encrypted = encryptedStringRegex.find(uri)!!.value | |
val decrypted = encrypted.reversed() | |
val newUri = encryptedStringRegex.replace(uri, decrypted) | |
val newRequest = object : HttpServletRequestWrapper(ctx.request) { | |
override fun getRequestURI() = newUri | |
} | |
ctx.request = newRequest | |
return null | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment