Skip to content

Instantly share code, notes, and snippets.

@ericlaw1979
Created March 28, 2022 20:53
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/c8fabea712e1db341f3424909d71afb0 to your computer and use it in GitHub Desktop.
Save ericlaw1979/c8fabea712e1db341f3424909d71afb0 to your computer and use it in GitHub Desktop.
FiddlerScript to modify response Set-Cookie headers
// Add to OnPeekAtResponseHeaders function
if (oSession.HostnameIs("www.example.com")) {
for (var i=0; i<oSession.ResponseHeaders.Count(); i++) {
var thisHeader = oSession.oResponse.headers[i];
if (!StringExtensions.OICEquals(thisHeader.Name, "Set-Cookie")) continue;
if (StringExtensions.OICContains(thisHeader.Value, "SameParty")) continue;
thisHeader.Value = (thisHeader.Value + '; SameParty');
oSession["ui-backcolor"] = "yellow";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment