How to Ensure React Uses Frontend's IP for HTTPS Requests?

Azure deployment scenario: Deployed on Azure, a React frontend and Python backend behind separate App Services and subnets yield 403 due to client IP restrictions. How to force frontend IP for HTTPS?

hey, have you tru tweaking your backend firewall settings? im curious if a reverse proxy could help force the correct ip through. im no expert but did anyone else try similar approaches? would love to hear other experince

In my experience, rather than trying to force the frontend’s IP to appear on backend-initiated HTTPS requests, it is more effective to modify your backend configuration to properly interpret forwarded headers. Adjusting settings on your reverse proxy or load balancer to include headers like X-Forwarded-For ensures your backend accurately logs and processes the client’s IP. This approach adheres to best practices, reduces potential security risks, and aligns well with cloud deployment strategies, especially in environments with complex networking such as Azure.

hey, i tweaked my azure settings to allow the front end’s real ip. ended up using a custom proxy to pass the forwarded headers. it’s not forcing the ip, but makes the config more secure. hope this may help u out!