Fix servant-examples
This commit is contained in:
parent
4d2b96c525
commit
29c445093e
1 changed files with 1 additions and 1 deletions
|
@ -29,7 +29,7 @@ instance HasServer rest => HasServer (AuthProtected :> rest) where
|
|||
type ServerT (AuthProtected :> rest) m = ServerT rest m
|
||||
|
||||
route Proxy subserver = WithRequest $ \ request ->
|
||||
route (Proxy :: Proxy rest) $ addAcceptCheck subserver $ cookieCheck request
|
||||
(request, route (Proxy :: Proxy rest) $ addAcceptCheck subserver $ cookieCheck request)
|
||||
where
|
||||
cookieCheck req = case lookup "Cookie" (requestHeaders req) of
|
||||
Nothing -> return $ FailFatal err401 { errBody = "Missing auth header" }
|
||||
|
|
Loading…
Reference in a new issue