Tried mitmproxy & mitmweb

Today I came by https://mitmproxy.org/ and gave it a shot just to know what it is capable of. For example for REST API communication debugging. The mitmweb is in beta, but looks good and also worked for me 🙂

The best is that they provide a docker image so trying it out was really simple.

  1. Just run docker run --rm -it -p 8080:8080 -p 8081:8081 --net="host" mitmproxy/mitmproxy mitmweb
  2. Open http://127.0.01:8081
  3. I changed Firefox to use proxy at 127.0.0.1 and port 8080 and browsed the web with mitmproxy intercepting the HTTP communication

mitmproxy & mitmweb

Advertisements

Fixing “Automatically populating $HTTP_RAW_POST_DATA is deprecated”

To reproduce try:

curl -X POST -H "Content-Type: application/json" -d "{foo: bar}" http://example.com

Great explanation can be found at https://www.bram.us/2014/10/26/php-5-6-automatically-populating-http_raw_post_data-is-deprecated-and-will-be-removed-in-a-future-version/

For me the solution on the shared hosting was adding the following line in .htaccess:

php_value always_populate_raw_post_data -1

Thanks to https://www.drupal.org/node/2485847#comment-10068266