summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2020-04-18 18:47:10 -0700
committerBen Sima <ben@bsima.me>2020-04-18 18:47:10 -0700
commitccf98e9587359fcdba8317c9674b382488564f2f (patch)
tree90b4bae712a125ec63a89f1fe87b6299a1126fcd
parentf79cfe42aac5f5cef8865f7a6975f6a430c923a1 (diff)
Allow '-' in quepaths and namespaces
-rw-r--r--Que/Server.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Que/Server.hs b/Que/Server.hs
index 5287c02..2b4e9f6 100644
--- a/Que/Server.hs
+++ b/Que/Server.hs
@@ -107,8 +107,8 @@ instance Envy.FromEnv Config
routes :: Scotty.ScottyT Text App ()
routes = do
Scotty.middleware logStdout
- let quepath = "^\\/([[:alnum:]_]+)\\/([[:alnum:]._/]*)$"
- let namespace = "^\\/([[:alnum:]_]+)\\/?$" -- matches '/ns' and '/ns/' but not '/ns/path'
+ let quepath = "^\\/([[:alnum:]_-]+)\\/([[:alnum:]._/-]*)$"
+ let namespace = "^\\/([[:alnum:]_-]+)\\/?$" -- matches '/ns' and '/ns/' but not '/ns/path'
-- GET /index.html
Scotty.get (Scotty.literal "/index.html") <| Scotty.redirect "/_/index"