How to restrict direct url access to dash app while using it with flask?

import flask
import dash
import dash_html_components as html

server = flask.Flask(name)

@server.route(’/’)
def index():
return ‘Hello Flask app’

app = dash.Dash(
name,
server=server,
routes_pathname_prefix=’/dash/’
)

app.layout = html.Div(“My Dash app”)

if name == ‘main’:
app.run_server(debug=True)

In this example, how do I restrict direct access to the dash app ie localhost:port/dash/
Thanks in advance :slight_smile:

Did you ever get this working the way you liked? If so what method did you use?