Safe HaskellNone

IHP.FrameworkConfig

Synopsis

Documentation

newtype AppHostname Source #

Constructors

AppHostname Text 

newtype AppPort Source #

Constructors

AppPort Int 

newtype BaseUrl Source #

Constructors

BaseUrl Text 

newtype RequestLoggerMiddleware Source #

Provides IHP with a middleware to log requests and responses.

By default this uses the RequestLogger middleware from wai-extra. Take a look at the wai-extra documentation when you want to customize the request logging.

See https://hackage.haskell.org/package/wai-extra-3.0.29.2/docs/Network-Wai-Middleware-RequestLogger.html

Set requestLoggerMiddleware = application -> application to disable request logging.

Constructors

RequestLoggerMiddleware Middleware 

newtype SessionCookie Source #

Provides the default settings for the session cookie.

  • Max Age: 30 days
  • Same Site Policy: Lax
  • HttpOnly (no access through JS)
  • secure, when baseUrl is a https url

Override this to set e.g. a custom max age or change the default same site policy.

Example: Set max age to 90 days > sessionCookie = defaultIHPSessionCookie { Cookie.setCookieMaxAge = Just (fromIntegral (60 * 60 * 24 * 90)) }

Constructors

SessionCookie SetCookie 

newtype DBPoolIdleTime Source #

How long db connection are kept alive inside the connecton pool when they're idle

newtype DBPoolMaxConnections Source #

Max number of db connections the connection pool can open to the database

type ConfigBuilder = StateT TMap IO () Source #

newtype ExceptionTracker Source #

Interface for exception tracking services such as sentry

Constructors

ExceptionTracker 

Fields

option :: forall option. Typeable option => option -> StateT TMap IO () Source #

Puts an option into the current configuration

In case an option already exists with the same type, it will not be overriden:

option Production
option Development
findOption @Environment

This code will return Production as the second call to option is ignored to not override the existing option.

findOption :: forall option. Typeable option => StateT TMap IO option Source #

data FrameworkConfig Source #

Constructors

FrameworkConfig 

Fields

fromConfig :: (?context :: context, ConfigProvider context) => (FrameworkConfig -> a) -> a Source #

Proxies FrameworkConfig fields contained in some context that can provider a FrameworkConfig

getConfig :: (?context :: context, ConfigProvider context) => FrameworkConfig Source #

Get the current frameworkConfig

defaultIHPSessionCookie :: Text -> SetCookie Source #

Returns the default IHP session cookie configuration. Useful when you want to override the default settings in $sel:sessionCookie:FrameworkConfig

data RootApplication Source #

Constructors

RootApplication 

Instances

Instances details
Eq RootApplication Source # 
Instance details

Defined in IHP.FrameworkConfig

Show RootApplication Source # 
Instance details

Defined in IHP.FrameworkConfig

isEnvironment :: (?context :: context, ConfigProvider context) => Environment -> Bool Source #

isDevelopment :: (?context :: context, ConfigProvider context) => Bool Source #

Returns True when the application is running in Development mode

Development mode means that the Development option is configured in Config/Config.hs

isProduction :: (?context :: context, ConfigProvider context) => Bool Source #

Returns True when the application is running in Production mode

Production mode means that the Production option is configured in Config/Config.hs