diff options
| author | LLLL Colonq <llll@colonq> | 2024-11-08 02:47:09 -0500 |
|---|---|---|
| committer | LLLL Colonq <llll@colonq> | 2024-11-08 02:47:09 -0500 |
| commit | 89638019139dd73fc4fa120e5b58937f20ee943a (patch) | |
| tree | 71ad946517cbb3c0d586c0e902896ea89ca2c301 | |
| parent | 013188027f114b9dce79899f2be17990780116eb (diff) | |
Unauthorized page
| -rw-r--r-- | fig-web/src/Fig/Web.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fig-web/src/Fig/Web.hs b/fig-web/src/Fig/Web.hs index 60dbbe7..b227911 100644 --- a/fig-web/src/Fig/Web.hs +++ b/fig-web/src/Fig/Web.hs @@ -74,6 +74,12 @@ app cfg cmds liveEvents currentlyLive = do Sc.scottyApp do -- Sc.middleware $ Wai.Static.staticPolicy $ Wai.Static.addBase cfg.assetPath Sc.get "/" $ Sc.redirect "/index.html" + Sc.get "/unauthorized" do + Sc.status status401 + Sc.text $ mconcat + [ "your request was rejected because that endpoint requires authentication\n" + , "you can log in by POSTing your credentials to https://auth.colonq.computer/api/firstfactor\n" + ] Sc.get "/api/check" $ authed cfg \auth -> do Sc.json @[Text] [auth.id, auth.name] Sc.put "/api/buffer" do |
