on master help sign in
Remove trailing whitespace
commita46f52a42706abfe27391b55deb3886c935d235a authorMichael Snoyman <michael@snoyman.com> dateTue 12 Jan 2016, 13:21 (11 years ago) parent049a3bb
1 file changed+6−6
wai-extra/Network/Wai/Middleware/ForceDomain.hs+6−6
wai-extra/Network/Wai/Middleware/ForceDomain.hs+6−6
@@ -11,13 +11,13 @@ import Prelude
1111import Network.Wai
1212import Network.Wai.Request
1313
14−-- | Force a domain by redirecting.
15−-- The `checkDomain` function takes the current domain and checks whether it is correct.
16−-- It should return `Nothing` if the domain is correct, or `Just "domain.com"` if it is incorrect.
14+-- | Force a domain by redirecting.
15+-- The `checkDomain` function takes the current domain and checks whether it is correct.
16+-- It should return `Nothing` if the domain is correct, or `Just "domain.com"` if it is incorrect.
1717--
1818-- @since 3.0.14
1919forceDomain :: (ByteString -> Maybe ByteString) -> Middleware
20−forceDomain checkDomain app req sendResponse =
20+forceDomain checkDomain app req sendResponse =
2121 case requestHeaderHost req >>= checkDomain of
2222 Nothing ->
2323 app req sendResponse
@@ -26,10 +26,10 @@ forceDomain checkDomain app req sendResponse =
2626
2727 where
2828 -- From: Network.Wai.Middleware.ForceSSL
29− redirectResponse domain =
29+ redirectResponse domain =
3030 responseBuilder status [(hLocation, location domain)] mempty
3131
32− location h =
32+ location h =
3333 let p = if appearsSecure req then "https://" else "http://" in
3434 p <> h <> rawPathInfo req <> rawQueryString req
3535