Using mitmproxy to solve the problem of running Chrome CDP locally and connecting from Docker
Chrome can only be accessed via localhost or 127.0.0.1. So in the past, I used to solve this with these Windows shell commands, but the problem was that I had t
GGAMI·
Chrome can only be accessed via localhost or 127.0.0.1.
The reason this is useful is that development and servers typically run in Docker,
and it can be harder than you'd think to check whether everything is working correctly.
So when developing, you can use this approach to develop quickly,
and then check that it runs properly on the server when it actually runs there.
I used to check it with something like puppeteer-screen-recorder.