Update how HTTP/2 is enabled

pull/456/head
Cyb3r-Jak3 2023-11-23 22:25:40 -05:00
parent 648d0b8233
commit 8245ac8b12
No known key found for this signature in database
1 changed files with 5 additions and 12 deletions

View File

@ -71,12 +71,10 @@ const httpsListen = (domain, global, ipPortPairs) => {
if (reusePortV4) ipPortPairs.add(ipPortV4);
// HTTPS
config.push([
'listen',
`${ipPortV4} ssl${domain.https.http2.computed ? ' http2' : ''}${
reusePortV4 ? ' reuseport' : ''
}`,
]);
config.push(['listen', `${ipPortV4} ssl${reusePortV4 ? ' reuseport' : ''}`]);
// HTTP/2
if (domain.https.http2.computed) config.push(['http2', 'on']);
// HTTP/3
if (domain.https.http3.computed) config.push(['listen', `${ipPortV4} http3`]);
@ -89,12 +87,7 @@ const httpsListen = (domain, global, ipPortPairs) => {
if (reusePortV6) ipPortPairs.add(ipPortV6);
// HTTPS
config.push([
'listen',
`${ipPortV6} ssl${domain.https.http2.computed ? ' http2' : ''}${
reusePortV6 ? ' reuseport' : ''
}`,
]);
config.push(['listen', `${ipPortV6} ssl${reusePortV6 ? ' reuseport' : ''}`]);
// HTTP/3
if (domain.https.http3.computed) config.push(['listen', `${ipPortV6} http3`]);