How do I use a proxy prefix with Flask in NVIDIA AI Workbench?

I’m working on a Flask application within NVIDIA AI Workbench and need to configure it to work behind a proxy. Could someone guide me on how to:

  1. Set up Flask to handle proxy headers correctly?
  2. Configure a reverse proxy (like Nginx or Apache) to forward requests to my Flask application?
  3. Ensure the application handles URLs properly when accessed through the proxy?

Any advice or examples would be greatly appreciated!

At the moment, there is no library to use proxy with Flask. Flask has disadvantage in that aspect. You have to handle it manually by creating appropriate functions.