Skip to content

Instantly share code, notes, and snippets.

@ericlaw1979
Created September 29, 2015 18:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ericlaw1979/c2520556dd9b35d78018 to your computer and use it in GitHub Desktop.
Save ericlaw1979/c2520556dd9b35d78018 to your computer and use it in GitHub Desktop.
//Inside Rules > Customize Rules > OnBeforeResponse
// Hide everything except responses of type TEXT/* containing "xyz"
if (!oSession.ExistsAndContains("Content-Type", "text/"))
{
oSession["ui-hide"] = "not text";
}
else
{
if (oSession.utilFindInResponse("xyz", true) < 0)
{
oSession["ui-hide"] = "text but didn't have xyz";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment