20 lines
534 B
Haskell
20 lines
534 B
Haskell
module Backend.Https where
|
|
|
|
import Backend.Http
|
|
import qualified Data.Text as T
|
|
import Toml (TomlCodec, (.=))
|
|
import qualified Toml
|
|
|
|
type HttpsConfiguration = (HttpConfiguration, TLSConfiguration)
|
|
|
|
data TLSConfiguration = TLSConfiguration
|
|
{ cerfFile :: FilePath,
|
|
certChain :: [FilePath],
|
|
keyFile :: FilePath
|
|
}
|
|
|
|
tlsDefaultSetting :: TLSConfiguration
|
|
tlsDefaultSetting = TLSConfiguration "certificate.pem" [] "key.pem"
|
|
|
|
httpsDefaultSetting :: HttpsConfiguration
|
|
httpsDefaultSetting = (httpDefaultSetting, tlsDefaultSetting)
|