mirror of
https://github.com/digitalocean/nginxconfig.io.git
synced 2025-11-05 10:46:10 +08:00
Added http/3 and port reuse support (#238)
* Added http/3 and port reuse support * eslint fixes * updated locale translations * euhm no one saw this * Did requested changes * fixed eslint * note to self tab is 4 spaces not 2 * Did requested changes * added coma * i forgot to ctrl + s * did requested changes * removed trailing comma * it should be reverted now * :PanSpoonSad: intensifies * Im bad at this
This commit is contained in:
@@ -62,11 +62,23 @@ const httpsListen = domain => {
|
||||
// HTTPS
|
||||
config.push(['listen', `${domain.server.listenIpv4.computed === '*' ? '' : `${domain.server.listenIpv4.computed}:`}443 ssl${domain.https.http2.computed ? ' http2' : ''}`]);
|
||||
|
||||
// HTTP/3
|
||||
if (domain.https.http3.computed)
|
||||
config.push(['listen',
|
||||
`${domain.server.listenIpv4.computed === '*' ? '' : `${domain.server.listenIpv4.computed}:`}443 http3`
|
||||
+ `${domain.https.portReuse.computed ? ' reuseport' : ''}`,
|
||||
]);
|
||||
|
||||
// v6
|
||||
if (domain.server.listenIpv6.computed)
|
||||
config.push(['listen',
|
||||
`[${domain.server.listenIpv6.computed}]:443 ssl${domain.https.http2.computed ? ' http2' : ''}`]);
|
||||
|
||||
// v6 HTTP/3
|
||||
if (domain.server.listenIpv6.computed && domain.https.http3.computed)
|
||||
config.push(['listen',
|
||||
`[${domain.server.listenIpv6.computed}]:443 http3${domain.https.portReuse.computed ? ' reuseport' : ''}`,
|
||||
]);
|
||||
return config;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user