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
|
||||
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
|
||||
if (domain.https.http3.computed)
|
||||
@@ -71,7 +71,7 @@ const httpsListen = domain => {
|
||||
// v6
|
||||
if (domain.server.listenIpv6.computed)
|
||||
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
|
||||
if (domain.server.listenIpv6.computed && domain.https.http3.computed)
|
||||
|
@@ -264,8 +264,8 @@ THE SOFTWARE.
|
||||
enabled: true,
|
||||
},
|
||||
portReuse: {
|
||||
default: true,
|
||||
enabled: false,
|
||||
default: false,
|
||||
enabled: true,
|
||||
},
|
||||
forceHttps: {
|
||||
default: true,
|
||||
@@ -359,19 +359,6 @@ THE SOFTWARE.
|
||||
},
|
||||
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
|
||||
'$props.data': {
|
||||
handler() {
|
||||
|
Reference in New Issue
Block a user