Ask HN: Using Flask as an API Gateway
My thought with using an api in between the ui and the backend is to provide a more scalable solution while keeping the two ends separate. However, I am not very familiar with flask and how to properly secure it.
The goal here is to have these services available in the local network. The api would be simply routing the params coming from the frontend (with the proper validation and auth) to the appropriate backend service.
The ui would be running on a docker container and sending the params to the api (running on the host), which would then invoke the appropriate service.
The question I have is: How can I make sure that the api won't be expose to the local network and only be available for the ui to talk to it?