I'm trying to create a reverse proxy that takes all requests and redirect them into a target url, like google.com or any other API. Unfortunately, all targets returns errors like page Not Found, or Forbidden Error.
Please see the source code here:
I spent many days trying to set appropriate headers but nothing worked so far. I think the headers were not set correctly but I don't how to copy headers from client and add it to the proxy.
I'm using a proxy instead of a redirect because I have to do some work with the body request and response!
Thanks in advance!