Home > Back-end >  Nginx as proxy which changes GET response
Nginx as proxy which changes GET response

Time:06-24

I need to relay a request to a Webservice that is not under my control and filter out bits and pieces and return the response to the initiator of the request.

By doing this, I can keep the location and credentials to this webservice secret to the initiator of the request and also filter out some of the data (the webservice doesn’t allow this directly). The filter could be a script of some sort (like a pipe: response from webservice -> filter -> return filtered response from webservice to serve request).

I have seen Nginx being used as reverse proxy (or perhaps even as proxy) with the ability to rewrite http headers or server names, etc, so I thought maybe this would be possible for Nginx. However, I haven’t actually seen (or found) an example of the paylod being altered. Perhaps I’m searching for the wrong keywords… Can anyone share some experience or point me in the right direction? I don’t necessarily use nginx, but I thought since I have some experience with it (and it offers authentication for instance and other thibgs), I’d start there.

CodePudding user response:

Here are some of your options:

  • Related