Last active
February 27, 2018 13:02
-
-
Save dstd/952305bf2b3e498a0dba42a2a425ef2a to your computer and use it in GitHub Desktop.
[Fiddler] Sessions coloring
This file contains 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
// ... | |
static function OnBeforeRequest(oSession: Session) { | |
// ... | |
var clientColors = ["red", "blue", "green", "gold", "orange", "purple"]; | |
var clientId = oSession.oRequest.headers["User-Agent"] + oSession.oRequest.headers["Authorization"]; | |
oSession["ui-color"] = clientColors[Math.abs(clientId.GetHashCode()) % clientColors.length]; | |
// ... | |
} | |
// ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment