Hello,
I have been using BasicAuth to manage the logins in my app, but when the user goes to any other page than the main, they get a 403 error. Has anyone successfully implemented serer.errorhandler with Dash?
Here’s what I tried:
server = Flask(__name__)
bootstrap = Bootstrap(server)
app = dash.Dash(__name__,
server=server,
)
def no_access(e):
return render_template('403.html'), 403
server.register_error_handler(403, no_access)
But that didn’t work and neither did:
from werkzeug.exceptions import HTTPException
@app.errorhandler(HTTPException)
def page_not_found(e):
return render_template('403.html')
I’d really appreciate pointers if anyone has ideas.
Thanks,
Daniel
1 post - 1 participant