I had same issue and in my situation the solution was to just set the requests_pathname_prefix
like this:
app = Dash(requests_pathname_prefix="/your_prefix/")
Setting the environment variable or both requests_pathname_prefix
and routes_pathname_prefix
lead to the site being unavailable.