0

My Flask web application is deployed on docker environment along with db and nginx.I want to pass HOSTNAME from database to nginx config file . Basically , I want to add to below line to proxy.conf . proxy_set_header Host $host; where $host 's value will be set from back end. How can we do it? Please suggest some options.

I am expecting to set host value from backend database. set $host host_ip_from_backend and then add proxy_set_header Host $host; By doing I want to mitigate host header injection as domain name or IP on which application runs keeps same changing and there is no fix domain. As part of solution I am looking to take set host header from back end to avoid host header injection.

0 Answers0