express-gateway icon indicating copy to clipboard operation
express-gateway copied to clipboard

[Question] Proxy changeOrigin not doing anything

Open jclaessens97 opened this issue 5 years ago • 3 comments

How I understand is the changeProxy option in the proxy policy meant to change he origin header to the gateway's origing and not from the e.g. browser's origin right?

If that's not what it's meant to do, please correct me and explain what it is meant to do 😉

If that IS what it's meant to do, it doesn't seem to work:

- proxy:
          action:
                serviceEndpoint: coreService
                changeOrigin: true

True or false, the origin I receive in my backend is always the origin of the browser and not of my gateway. I only want to allow the CORS from the gateway, not from the frontend if that's possible.

Thanks!

jclaessens97 avatar Feb 27 '20 12:02 jclaessens97

@jclaessens97 Did you find a solution ?

NomadXD avatar Apr 29 '20 15:04 NomadXD

It was just a poc so I ended with adding the original origin to the CORS config, but no real solution found.

jclaessens97 avatar Apr 29 '20 15:04 jclaessens97

changeOrigin adjusts the Host header on the outgoing request, not the Origin header.

chrisrichard avatar Sep 19 '20 03:09 chrisrichard