I implemented very rudimentary simple HTTP authentication for Prodigy and wanted to share it with anyone who’s interested. I know this isn’t secure but it’s the best I could do with my minimal web skills. It would be great to have something like Jupyter’s token-based authentication some day.
At line 43 of
app.py, add this:
authentication = hug.authentication.basic(hug.authentication.verify('annotator1', 'mypassword')) @hug.static('/', requires = authentication) def serve_static(): # NB! This currently serves whole drive! Does nothing to prevent '../' return (str(Path(__file__).parent / 'static'),)
I used example code from the hug repo.