3 / 7

Authentication (optional)URL copied

Set username and password in your .vyasa file or via VYASA_USER / VYASA_PASSWORD environment variables to enable session-based authentication. When enabled:

  • Beforeware middleware: Intercepts all requests (except login page, static files, and CSS/JS)
  • Login flow:
    • Unauthenticated users redirected to /login with next URL saved in session
    • Login form uses MonsterUI styling (UK input classes, styled buttons)
    • Successful login stores username in request.session["auth"]
    • Redirects to original next URL after authentication
  • Error handling: Invalid credentials show red error message below form
  • Route exclusions: RegEx patterns skip auth for ^/login$, ^/_sidebar/.*, ^/static/.*, .*\.css, .*\.js

Authentication is completely optional—if no credentials configured, Beforeware is set to None and all routes are publicly accessible.