yesod-session-persist-0.0.0.0: internal/Session/TransportSecurity.hs
module Session.TransportSecurity
( TransportSecurity (..)
, cookieSecure
) where
import Internal.Prelude
data TransportSecurity
= -- | Only allow cookies on HTTPS connections
--
-- Set this in production.
RequireSecureTransport
| -- | Allow cookies over either HTTP or HTTPS
--
-- This is okay for development.
AllowPlaintextTranport
cookieSecure :: TransportSecurity -> Bool
cookieSecure = \case
RequireSecureTransport -> True
AllowPlaintextTranport -> False