- name: login page
  on: path /login
  do: pass
- name: protected
  on: |
    !path glob("/api/v1/auth/*")
    !path glob("/auth/*")
    !path /icon0.svg
    !path /favicon.ico
    !path /apple-icon.png
    !path glob("/web-app-manifest-*x*.png")
    !path regex("\/assets\/(chunks\/)?[a-zA-Z0-9\-_]+\.(css|js|woff2)")
    !path regex("\/assets\/workbox-window\.prod\.es5-[a-zA-Z0-9]+\.js")
    !path regex("/workbox-[a-zA-Z0-9]+\.js")
    !path /api/v1/version
    !path /manifest.webmanifest
    !path /sw.js
    !path /registerSW.js
  do: require_auth
- name: proxy to backend
  on: path glob("/api/v1/*")
  do: proxy http://${API_ADDR}/
- name: proxy to auth api
  on: path glob("/auth/*")
  do: |
    rewrite /auth /api/v1/auth
    proxy http://${API_ADDR}/
