diff options
author | Ben Sima <ben@bsima.me> | 2020-04-18 18:47:10 -0700 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2020-04-18 18:47:10 -0700 |
commit | ccf98e9587359fcdba8317c9674b382488564f2f (patch) | |
tree | 90b4bae712a125ec63a89f1fe87b6299a1126fcd /Que | |
parent | f79cfe42aac5f5cef8865f7a6975f6a430c923a1 (diff) |
Allow '-' in quepaths and namespaces
Diffstat (limited to 'Que')
-rw-r--r-- | Que/Server.hs | 4 |
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" |