Charles Proxy - Map remote to localhost from https to http

gutte picture gutte · May 9, 2018 · Viewed 8.8k times · Source

I'm trying to use Charles to map requests for my server to localhost on my Mac. The server is on HTTPS and the local is HTTP. I'm trying that from the Chrome browser, iOS simulator and Postman. it always fails.

I set map remote in charles from my-server.com/* to http://localhost:PORT. If I try https://my-server.com/, charles maps the request but I get error in CONNECT request. If I try http://my-server.com, the request succeeds.

EDIT: There is an answer that suggests rewrite instead of map remote. it is good and working, but it feels to me as a workaround. I would like to use map remote as usual. I guess it require both Charles setup and machine setup

Answer

kubano picture kubano · May 25, 2018

You should try using the Rewrite function like this:

enter image description here