support combineing --socket with HTTPs
Might be useful when proxying? Dunno.
This commit is contained in:
parent
492c484a82
commit
ef30fa2fa9
1 changed files with 7 additions and 6 deletions
|
@ -188,13 +188,14 @@ runServer o mst = go `finally` serverShutdownCleanup mst
|
||||||
Just socketpath ->
|
Just socketpath ->
|
||||||
withsocket socketpath $ \sock ->
|
withsocket socketpath $ \sock ->
|
||||||
Warp.runSettingsSocket settings sock app
|
Warp.runSettingsSocket settings sock app
|
||||||
(Just certfile, Just privatekeyfile) ->
|
(Just certfile, Just privatekeyfile) -> do
|
||||||
|
let tlssettings = Warp.tlsSettingsChain
|
||||||
|
certfile (chainFileOption o) privatekeyfile
|
||||||
case socketOption o of
|
case socketOption o of
|
||||||
Nothing -> do
|
Nothing -> Warp.runTLS tlssettings settings app
|
||||||
let tlssettings = Warp.tlsSettingsChain
|
Just socketpath ->
|
||||||
certfile (chainFileOption o) privatekeyfile
|
withsocket socketpath $ \sock ->
|
||||||
Warp.runTLS tlssettings settings app
|
Warp.runTLSSocket tlssettings settings sock app
|
||||||
Just _socketpath -> giveup "HTTPS is not supported with --socket"
|
|
||||||
_ -> giveup "You must use both --certfile and --privatekeyfile options to enable HTTPS."
|
_ -> giveup "You must use both --certfile and --privatekeyfile options to enable HTTPS."
|
||||||
port = maybe
|
port = maybe
|
||||||
(fromIntegral defaultP2PHttpProtocolPort)
|
(fromIntegral defaultP2PHttpProtocolPort)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue