wai-extra-3.0.19.1: Provides some basic WAI handlers and middleware.

Safe Haskell | None
Language | Haskell2010

Network.Wai.Middleware.ForceDomain

Description

Since: 3.0.14

Synopsis

- forceDomain :: (ByteString -> Maybe ByteString) -> Middleware

# Documentation

forceDomain :: (ByteString -> Maybe ByteString) -> Middleware #

Force a domain by redirecting. The `checkDomain` function takes the current domain and checks whether it is correct. It should return `Nothing` if the domain is correct, or `Just "domain.com"` if it is incorrect.

Since: 3.0.14