Can't disable the edge proxy
amirsolt
HOBBYOP

2 years ago

My web app checks the IP address of the user, but after deploying I realized I'm getting the wrong IP address which means the edge proxy is not forwarding the IP address properly. I really don't know how it works in the backend.
When trying to disable the edge proxy I get this message:
Failed to update edge entrypoint

One of your domains is configured with target ports which requires the new proxy. Delete the domain before trying to disable the proxy.

I don't really understand the message since I'm using the default node port 8080 and I have my domain with cloudflare and the proxy on cloudflare is off.

Solved

2 Replies

2 years ago

The edge proxy is setting the correct header, no issues there.

The issue is that you have middleware that is updating the request IP from the X-Forwarded-For header, but will only do that if the original request IP is within a private range, but the edge proxy will forward requests to your app from the range of 100.0.0.0/8 so you will need to update the middleware to trust IPs in this range also.


amirsolt
HOBBYOP

2 years ago

The edge proxy is setting the correct header, no issues there.

The issue is that you have middleware that is updating the request IP from the X-Forwarded-For header, but will only do that if the original request IP is within a private range, but the edge proxy will forward requests to your app from the range of 100.0.0.0/8 so you will need to update the middleware to trust IPs in this range also.

Solved, thank you.


Status changed to Solved brody over 1 year ago


Loading...