HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulewai-extra-3.1.16Haskell2010

Network.Wai.Request

Some helpers for interrogating a WAI Request.

  • 1 type
  • 3 values
valueappearsSecure :: Request -> Bool
#

Does this request appear to have been made over an SSL connection?

This function first checks isSecure, but also checks for headers that may indicate a secure connection even in the presence of reverse proxies.

Note: these headers can be easily spoofed, so decisions which require a true SSL connection (i.e. sending sensitive information) should only use isSecure. This is not always the case though: for example, deciding to force a non-SSL request to SSL by redirect. One can safely choose not to redirect when the request appears secure, even if it's actually not.