mirror of
https://github.com/digitalocean/nginxconfig.io.git
synced 2025-09-23 20:54:31 +08:00
reuseport is not HTTP/3 only (#283)
* reuseport is not HTTP/3 only * Forgot to remove these * Move reuseport to global > https * Update i18n files * Only set reuseport once per ip:port pair * Move reuseport opt outside ssl conditional * Update copyright headers of touched files Co-authored-by: MattIPv4 <me@mattcowley.co.uk>
This commit is contained in:
@@ -96,24 +96,6 @@ THE SOFTWARE.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="portReuseEnabled" class="field is-horizontal">
|
||||
<div class="field-label">
|
||||
<label class="label">{{ $t('templates.domainSections.https.portReuse') }}</label>
|
||||
</div>
|
||||
<div class="field-body">
|
||||
<div class="field">
|
||||
<div :class="`control${portReuseChanged ? ' is-changed' : ''}`">
|
||||
<div class="checkbox">
|
||||
<PrettyCheck v-model="portReuse" class="p-default p-curve p-fill p-icon">
|
||||
<i slot="extra" class="icon fas fa-check"></i>
|
||||
{{ $t('templates.domainSections.https.enableReuseOfPort') }}
|
||||
</PrettyCheck>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="forceHttpsEnabled" class="field is-horizontal">
|
||||
<div class="field-label">
|
||||
<label class="label">{{ $t('templates.domainSections.https.forceHttps') }}</label>
|
||||
@@ -263,10 +245,6 @@ THE SOFTWARE.
|
||||
default: false,
|
||||
enabled: true,
|
||||
},
|
||||
portReuse: {
|
||||
default: true,
|
||||
enabled: false,
|
||||
},
|
||||
forceHttps: {
|
||||
default: true,
|
||||
enabled: true,
|
||||
@@ -359,19 +337,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() {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Copyright 2020 DigitalOcean
|
||||
Copyright 2021 DigitalOcean
|
||||
|
||||
This code is licensed under the MIT License.
|
||||
You may obtain a copy of the License at
|
||||
@@ -26,6 +26,24 @@ THE SOFTWARE.
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<div class="field is-horizontal">
|
||||
<div class="field-label">
|
||||
<label class="label">{{ $t('templates.globalSections.https.portReuse') }}</label>
|
||||
</div>
|
||||
<div class="field-body">
|
||||
<div class="field">
|
||||
<div :class="`control${portReuseChanged ? ' is-changed' : ''}`">
|
||||
<div class="checkbox">
|
||||
<PrettyCheck v-model="portReuse" class="p-default p-curve p-fill p-icon">
|
||||
<i slot="extra" class="icon fas fa-check"></i>
|
||||
{{ $t('templates.globalSections.https.enableReuseOfPort') }}
|
||||
</PrettyCheck>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="!sslProfileEnabled" class="field is-horizontal is-aligned-top">
|
||||
<div class="field-label">
|
||||
<label class="label">{{ $t('templates.globalSections.https.sslProfile') }}</label>
|
||||
@@ -239,6 +257,10 @@ THE SOFTWARE.
|
||||
};
|
||||
|
||||
const defaults = {
|
||||
portReuse: {
|
||||
default: false,
|
||||
enabled: true,
|
||||
},
|
||||
sslProfile: {
|
||||
default: 'intermediate',
|
||||
options: {
|
||||
|
Reference in New Issue
Block a user