aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Sproxy/Server.hs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/Sproxy/Server.hs b/src/Sproxy/Server.hs
index 5c80e44..3c34b0c 100644
--- a/src/Sproxy/Server.hs
+++ b/src/Sproxy/Server.hs
@@ -75,12 +75,18 @@ server configFile = do
(\f -> Log.info ("reading key from " ++ f) >> BS.readFile f)
(cfKey cf)
+ let
+ settings =
+ (if cfHTTP2 cf then id else setHTTP2Disabled) $
+ setOnException (\_ _ -> return ())
+ defaultSettings
+
case maybe80 of
Nothing -> return ()
Just sock80 -> do
Log.info "listening on port 80 (HTTP redirect)"
listen sock80 maxListenQueue
- void . forkIO $ runSettingsSocket defaultSettings sock80 (redirect $ cfListen cf)
+ void . forkIO $ runSettingsSocket settings sock80 (redirect $ cfListen cf)
oauth2clients <- HM.fromList <$> mapM newOAuth2Client (HM.toList (cfOAuth2 cf))
@@ -90,12 +96,6 @@ server configFile = do
return (compile $ beName be, be, m)
) $ cfBackends cf
- let
- settings =
- (if cfHTTP2 cf then id else setHTTP2Disabled) $
- setOnException (\_ _ -> return ())
- defaultSettings
-
-- XXX 2048 is from bindPortTCP from streaming-commons used internally by runTLS.
-- XXX Since we don't call runTLS, we listen socket here with the same options.
Log.info $ "listening on port " ++ show (cfListen cf) ++ " (HTTPS)"