-defaultConfig ∷ Config
-defaultConfig = Config {
- cnfServerSoftware = "Lucu/1.0"
- , cnfServerHost = T.pack (unsafePerformIO getHostName)
- , cnfServerPort = "http"
- , cnfServerV4Addr = Just "0.0.0.0"
- , cnfServerV6Addr = Just "::"
- , cnfSSLConfig = Nothing
- , cnfMaxPipelineDepth = 100
- , cnfMaxEntityLength = 16 * 1024 * 1024 -- 16 MiB
- , cnfDumpTooLateAbortionToStderr = True
- , cnfExtToMIMEType = defaultExtensionMap
- }
+instance Default Config where
+ def = Config {
+ cnfServerSoftware = "Lucu/1.0"
+ , cnfServerHost = CI.mk ∘ cs $ unsafePerformIO getHostName
+ , cnfServerPort = "http"
+ , cnfServerV4Addr = Just "0.0.0.0"
+ , cnfServerV6Addr = Just "::"
+#if defined(HAVE_SSL)
+ , cnfSSLConfig = Nothing
+#endif
+ , cnfMaxPipelineDepth = 100
+ , cnfMaxEntityLength = 16 * 1024 * 1024 -- 16 MiB
+ , cnfDumpTooLateAbortionToStderr = True
+ , cnfExtToMIMEType = defaultExtensionMap
+ }