ihp-1.4.0: Haskell Web Framework
Copyright(c) digitally induced GmbH 2020
Safe HaskellNone
LanguageGHC2021

IHP.FrameworkConfig.Types

Description

This module contains the core types for IHP's framework configuration. It's designed to be lightweight and avoid Template Haskell dependencies, allowing modules that only need the types to compile faster.

For the full configuration API including defaults, use FrameworkConfig.

Synopsis

Documentation

newtype AppHostname Source #

Constructors

AppHostname Text 

newtype AppPort Source #

Constructors

AppPort Int 

Instances

Instances details
EnvVarReader AppPort Source # 
Instance details

Defined in IHP.FrameworkConfig

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.

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 

type ConfigBuilder = StateT TMap IO () Source #

newtype ExceptionTracker Source #

Interface for exception tracking services such as sentry

Constructors

ExceptionTracker 

newtype IdeBaseUrl Source #

Typically "http://localhost:8001", Url where the IDE is running

Constructors

IdeBaseUrl Text 

newtype RLSAuthenticatedRole Source #

Postgres role to be used for making queries with Row level security enabled

newtype AssetVersion Source #

Constructors

AssetVersion Text 

newtype Initializer Source #

Constructors

Initializer 

Fields

data FrameworkConfig Source #

Constructors

FrameworkConfig 

Fields

Instances

Instances details
HasField "frameworkConfig" FrameworkConfig FrameworkConfig Source # 
Instance details

Defined in IHP.FrameworkConfig.Types

HasField "frameworkConfig" ControllerContext FrameworkConfig Source #

Access frameworkConfig via the request vault

Instance details

Defined in IHP.Controller.Context

HasField "frameworkConfig" Request FrameworkConfig Source # 
Instance details

Defined in IHP.RequestVault

type ConfigProvider context = HasField "frameworkConfig" context FrameworkConfig Source #