-
-
Save chayn1k/80de91c6a6d13e58fa429bff38d9b44f to your computer and use it in GitHub Desktop.
Change response in Fiddler
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) { | |
if (oSession.RequestMethod == 'GET' && oSession.PathAndQuery.IndexOf('part_of_your_url') > 0) { | |
oSession.utilCreateResponseAndBypassServer(); | |
oSession.oResponse.headers.HTTPResponseCode = 401; | |
oSession.oResponse.headers.HTTPResponseStatus = '401 Not Authorized'; | |
oSession.oResponse.headers['Access-Control-Allow-Origin'] = '*'; | |
oSession.utilSetResponseBody('response_body'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment