Skip to content

Commit

Permalink
Merge pull request #247 from nickpape-msft/master
Browse files Browse the repository at this point in the history
Add a config option for preferring HTTP1
  • Loading branch information
avevlad committed Feb 16, 2018
2 parents df25440 + 8869a6d commit 7265554
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.coffee
Expand Up @@ -26,6 +26,7 @@ class ConnectApp
@debug = options.debug || false
@silent = options.silent || false
@https = options.https || false
@preferHttp1 = options.preferHttp1 || false;
@livereload = options.livereload || false
@middleware = options.middleware || undefined
@startedCallback = startedCallback || () -> {};
Expand Down Expand Up @@ -70,7 +71,7 @@ class ConnectApp
@https.ca = fs.readFileSync __dirname + '/certs/server.crt'
@https.passphrase = 'gulp'

if http2
if !@preferHttp1 && http2
@https.allowHTTP1 = true
@server = http2.createSecureServer(@https, @app)
else
Expand Down

0 comments on commit 7265554

Please sign in to comment.