Add header to requests with Charles

Viewed 12961

I am trying to use Charles (http://www.charlesproxy.com) to add a header to every HTTP request I execute in a browser. The web app I am using is relying on a header to work correctly. I have setup a rewrite rule to add a header like this: enter image description here enter image description here

Charles error log shows that the request is matched and it says it added the header:

2017/05/24 16:34:04 INFO     com.xk72.charles.tools.rewrite.RewriteFilter          CONNECT https://www.googleapis.com   Testing: Add Header: MY_HEADER:MY_HEADER_VALUE
2017/05/24 16:34:04 INFO     com.xk72.charles.tools.rewrite.RewriteFilter          CONNECT https://www.googleapis.com   Matched: Add Header: MY_HEADER:MY_HEADER_VALUE  Rewrite: MY_HEADER_VALUE

But when I try to open the web app in question in Chrome by typing in a url and when I inspect the traffic in Chrome Dev Tools, I don't see the header and my app doesn't work. enter image description here

1 Answers
Related