mirror of
https://github.com/digitalocean/nginxconfig.io.git
synced 2025-09-23 20:54:31 +08:00
reuseport is not HTTP/3 only
This commit is contained in:
@@ -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)
|
||||||
|
@@ -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() {
|
||||||
|
Reference in New Issue
Block a user