Dead simple HTTP Proxy that inserts Content-Type if the Content-Type field is missing or empty in the header of POST. This is just a PoC to show how easy it is to edit HTTP Header with Proxy.
Please note that this is NOT for production, even though it might also be the help for someone in trouble with HTTP Header 😅
https://seclists.org/fulldisclosure/2018/Sep/16
Large part of the code that make it work as HTTP proxy is retrieved from HTTP(S) Proxy in Golang in less than 100 lines of code by @mlowicki.
Executables can be found in releases page.
Linux | ContentTypeProxy |
Windows | ContentTypeProxy.exe |
Download main.go
and build it, and you can get the executable.
git clone git@github.com:wmnsk/ContentTypeProxy.git
cd ContentTypeProxy
go build
Run ContentTypeProxy on a server, and set your browser's proxy to that server.
Address:Port to listen and Content-Type to be added can be specified in command-line arguments.
Usage of ContentTypeProxy:
-addr string
address to serve HTTP (default "0.0.0.0:55555")
-type string
Content-Type to set (default "text/plain")