| Safe Haskell | None | 
|---|---|
| Language | Haskell2010 | 
Network.Wai.Request
Description
Some helpers for interrogating a WAI Request.
Synopsis
- appearsSecure :: Request -> Bool
- guessApproot :: Request -> ByteString
- data RequestSizeException = RequestSizeException Word64
- requestSizeCheck :: Word64 -> Request -> IO Request
Documentation
appearsSecure :: Request -> Bool Source #
Does this request appear to have been made over an SSL connection?
This function first checks isSecure
Note: these headers can be easily spoofed, so decisions which require a true
 SSL connection (i.e. sending sensitive information) should only use
 isSecure
Since: 3.0.7
guessApproot :: Request -> ByteString Source #
Guess the "application root" based on the given request.
The application root is the basis for forming URLs pointing at the current application. For more information and relevant caveats, please see Network.Wai.Middleware.Approot.
Since: 3.0.7
data RequestSizeException Source #
see requestSizeCheck
Since: 3.0.15
Constructors
| RequestSizeException Word64 | 
Instances
requestSizeCheck :: Word64 -> Request -> IO Request Source #
Check request body size to avoid server crash when request is too large.
This function first checks requestBodyLengthRequestSizeException are thrown when user use requestBody
Since: 3.0.15