Skip to content

Instantly share code, notes, and snippets.

@richkuz
Created October 8, 2020 21:01
Show Gist options
  • Save richkuz/b8f92969d1a99ebb43c7c490e10c8df5 to your computer and use it in GitHub Desktop.
Save richkuz/b8f92969d1a99ebb43c7c490e10c8df5 to your computer and use it in GitHub Desktop.
Inject a GitHub gist JS file into Charles proxy

You can inject an arbitrary JS file from a GitHub gist in place of another JS file on a web page using Charles proxy.

Map the remote path to the gist raw content path:

Tools -> Map Remote

image

Then update the Content-Type header from plain text to text/javascript so you don't get CORB errors.

Tools -> Rewrite...

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment