reuseport is not HTTP/3 only

This commit is contained in:
Daniel Walsh
2021-06-24 18:30:27 +01:00
parent 3e99dc25aa
commit 1a7f589c92
2 changed files with 4 additions and 17 deletions

View File

@@ -61,7 +61,7 @@ const httpsListen = domain => {
// HTTPS // HTTPS
config.push(['listen', config.push(['listen',
`${domain.server.listenIpv4.computed === '*' ? '' : `${domain.server.listenIpv4.computed}:`}443 ssl${domain.https.http2.computed ? ' http2' : ''}`]); `${domain.server.listenIpv4.computed === '*' ? '' : `${domain.server.listenIpv4.computed}:`}443 ssl${domain.https.http2.computed ? ' http2' : ''}${domain.https.portReuse.computed ? ' reuseport' : ''}`]);
// HTTP/3 // HTTP/3
if (domain.https.http3.computed) if (domain.https.http3.computed)
@@ -71,7 +71,7 @@ const httpsListen = domain => {
// v6 // v6
if (domain.server.listenIpv6.computed) if (domain.server.listenIpv6.computed)
config.push(['listen', config.push(['listen',
`[${domain.server.listenIpv6.computed}]:443 ssl${domain.https.http2.computed ? ' http2' : ''}`]); `[${domain.server.listenIpv6.computed}]:443 ssl${domain.https.http2.computed ? ' http2' : ''}${domain.https.portReuse.computed ? ' reuseport' : ''}`]);
// v6 HTTP/3 // v6 HTTP/3
if (domain.server.listenIpv6.computed && domain.https.http3.computed) if (domain.server.listenIpv6.computed && domain.https.http3.computed)

View File

@@ -264,8 +264,8 @@ THE SOFTWARE.
enabled: true, enabled: true,
}, },
portReuse: { portReuse: {
default: true, default: false,
enabled: false, enabled: true,
}, },
forceHttps: { forceHttps: {
default: true, default: true,
@@ -359,19 +359,6 @@ THE SOFTWARE.
}, },
deep: true, deep: true,
}, },
// Only allow port reuse when HTTP/3 is enabled first
'$props.data.http3': {
handler(data) {
if (data.computed) {
this.$props.data.portReuse.enabled = true;
this.$props.data.portReuse.computed = this.$props.data.portReuse.value;
} else {
this.$props.data.portReuse.enabled = false;
this.$props.data.portReuse.computed = false;
}
},
deep: true,
},
// Disable hsts options if hsts is disabled // Disable hsts options if hsts is disabled
'$props.data': { '$props.data': {
handler() { handler() {