From 952ab4ce5e30f08dc6a4410c5c9fc0502e8b6aee Mon Sep 17 00:00:00 2001 From: MrJmpl3 Date: Sat, 8 Oct 2022 12:21:55 -0500 Subject: [PATCH] :art: refactor: update key to proxyHostHeader and i18n messages --- .../generators/conf/website.conf.js | 2 +- .../templates/domain_sections/reverse_proxy.js | 2 +- .../templates/domain_sections/reverse_proxy.js | 2 +- .../templates/domain_sections/reverse_proxy.js | 2 +- .../templates/domain_sections/reverse_proxy.js | 2 +- .../templates/domain_sections/reverse_proxy.js | 2 +- .../templates/domain_sections/reverse_proxy.js | 2 +- .../templates/domain_sections/reverse_proxy.js | 2 +- .../templates/domain_sections/reverse_proxy.js | 2 +- .../templates/domain_sections/reverse_proxy.js | 2 +- .../templates/domain_sections/reverse_proxy.js | 2 +- .../domain_sections/reverse_proxy.vue | 18 +++++++++--------- 12 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/nginxconfig/generators/conf/website.conf.js b/src/nginxconfig/generators/conf/website.conf.js index fd4a728..0363f5d 100644 --- a/src/nginxconfig/generators/conf/website.conf.js +++ b/src/nginxconfig/generators/conf/website.conf.js @@ -279,7 +279,7 @@ export default (domain, domains, global, ipPortPairs) => { if (domain.reverseProxy.reverseProxy.computed) { const locConf = []; locConf.push(['proxy_pass', domain.reverseProxy.proxyPass.computed]); - locConf.push(['proxy_set_header Host', domain.reverseProxy.proxyHeaderOverride.computed]); + locConf.push(['proxy_set_header Host', domain.reverseProxy.proxyHostHeader.computed]); if (global.tools.modularizedStructure.computed) { // Modularized diff --git a/src/nginxconfig/i18n/de/templates/domain_sections/reverse_proxy.js b/src/nginxconfig/i18n/de/templates/domain_sections/reverse_proxy.js index 6fc436d..52d9c66 100644 --- a/src/nginxconfig/i18n/de/templates/domain_sections/reverse_proxy.js +++ b/src/nginxconfig/i18n/de/templates/domain_sections/reverse_proxy.js @@ -31,5 +31,5 @@ export default { reverseProxyCannotBeEnabledWithPhp: `${common.reverseProxy} kann nicht aktiviert werden, während ${common.php} aktiviert ist.`, reverseProxyCannotBeEnabledWithPython: `${common.reverseProxy} kann nicht aktiviert werden, während ${common.python} aktiviert ist.`, enableReverseProxy: `${common.enable} ${common.reverseProxy}`, - proxyHeaderOverride: 'Proxy header override', // TODO: translate + proxyHostHeader: 'Proxy Host header', // TODO: translate }; diff --git a/src/nginxconfig/i18n/en/templates/domain_sections/reverse_proxy.js b/src/nginxconfig/i18n/en/templates/domain_sections/reverse_proxy.js index fc692ba..8cd8ecf 100644 --- a/src/nginxconfig/i18n/en/templates/domain_sections/reverse_proxy.js +++ b/src/nginxconfig/i18n/en/templates/domain_sections/reverse_proxy.js @@ -31,5 +31,5 @@ export default { reverseProxyCannotBeEnabledWithPhp: `${common.reverseProxy} cannot be enabled whilst ${common.php} is enabled.`, reverseProxyCannotBeEnabledWithPython: `${common.reverseProxy} cannot be enabled whilst ${common.python} is enabled.`, enableReverseProxy: `${common.enable} ${common.reverseProxyLower}`, - proxyHeaderOverride: 'Proxy Host header', + proxyHostHeader: 'Proxy Host header', }; diff --git a/src/nginxconfig/i18n/es/templates/domain_sections/reverse_proxy.js b/src/nginxconfig/i18n/es/templates/domain_sections/reverse_proxy.js index 4f54b63..b13ca31 100644 --- a/src/nginxconfig/i18n/es/templates/domain_sections/reverse_proxy.js +++ b/src/nginxconfig/i18n/es/templates/domain_sections/reverse_proxy.js @@ -31,5 +31,5 @@ export default { reverseProxyCannotBeEnabledWithPhp: `${common.reverseProxy} no se puede habilitar mientras ${common.php} está habilitado.`, reverseProxyCannotBeEnabledWithPython: `${common.reverseProxy} no se puede habilitar mientras ${common.python} está habilitado.`, enableReverseProxy: `${common.enable} ${common.reverseProxyLower}`, - proxyHeaderOverride: 'Proxy header override', // TODO: translate + proxyHostHeader: 'Proxy Host header', // TODO: translate }; diff --git a/src/nginxconfig/i18n/fr/templates/domain_sections/reverse_proxy.js b/src/nginxconfig/i18n/fr/templates/domain_sections/reverse_proxy.js index 42def62..566c7fc 100644 --- a/src/nginxconfig/i18n/fr/templates/domain_sections/reverse_proxy.js +++ b/src/nginxconfig/i18n/fr/templates/domain_sections/reverse_proxy.js @@ -31,5 +31,5 @@ export default { reverseProxyCannotBeEnabledWithPhp: `Le ${common.reverseProxyLower} ne peut pas être activé en même temps que ${common.php}.`, reverseProxyCannotBeEnabledWithPython: `Le ${common.reverseProxyLower} ne peut pas être activé en même temps que ${common.python}.`, enableReverseProxy: `${common.enable} le ${common.reverseProxyLower}`, - proxyHeaderOverride: 'Proxy header override', // TODO: translate + proxyHostHeader: 'Proxy Host header', // TODO: translate }; diff --git a/src/nginxconfig/i18n/ja/templates/domain_sections/reverse_proxy.js b/src/nginxconfig/i18n/ja/templates/domain_sections/reverse_proxy.js index 75a909e..e4dcedf 100644 --- a/src/nginxconfig/i18n/ja/templates/domain_sections/reverse_proxy.js +++ b/src/nginxconfig/i18n/ja/templates/domain_sections/reverse_proxy.js @@ -31,5 +31,5 @@ export default { reverseProxyCannotBeEnabledWithPhp: `${common.php} が有効な場合は、 ${common.reverseProxy} を有効にすることはできません。`, reverseProxyCannotBeEnabledWithPython: `${common.python} が有効な場合は、 ${common.reverseProxy} を有効にすることはできません。`, enableReverseProxy: `${common.reverseProxyLower}を${common.enable}`, - proxyHeaderOverride: 'Proxy header override', // TODO: translate + proxyHostHeader: 'Proxy Host header', // TODO: translate }; diff --git a/src/nginxconfig/i18n/pl/templates/domain_sections/reverse_proxy.js b/src/nginxconfig/i18n/pl/templates/domain_sections/reverse_proxy.js index 9792242..fb6e2ce 100644 --- a/src/nginxconfig/i18n/pl/templates/domain_sections/reverse_proxy.js +++ b/src/nginxconfig/i18n/pl/templates/domain_sections/reverse_proxy.js @@ -31,5 +31,5 @@ export default { reverseProxyCannotBeEnabledWithPhp: `${common.reverseProxy} nie może zostać włączony dopóki włączony jest ${common.php}.`, reverseProxyCannotBeEnabledWithPython: `${common.reverseProxy} nie może zostać włączony dopóki włączony jest ${common.python}.`, enableReverseProxy: `${common.enable} ${common.reverseProxyLower}`, - proxyHeaderOverride: 'Proxy header override', // TODO: translate + proxyHostHeader: 'Proxy Host header', // TODO: translate }; diff --git a/src/nginxconfig/i18n/pt-br/templates/domain_sections/reverse_proxy.js b/src/nginxconfig/i18n/pt-br/templates/domain_sections/reverse_proxy.js index ee94e72..1234f5e 100644 --- a/src/nginxconfig/i18n/pt-br/templates/domain_sections/reverse_proxy.js +++ b/src/nginxconfig/i18n/pt-br/templates/domain_sections/reverse_proxy.js @@ -31,5 +31,5 @@ export default { reverseProxyCannotBeEnabledWithPhp: `O ${common.reverseProxy} não pode ser habilitado enquanto o ${common.php} estiver habilitado.`, reverseProxyCannotBeEnabledWithPython: `O ${common.reverseProxy} não pode ser habilitado enquanto o ${common.python} estiver habilitado.`, enableReverseProxy: `${common.enable} ${common.reverseProxyLower}`, - proxyHeaderOverride: 'Proxy header override', // TODO: translate + proxyHostHeader: 'Proxy Host header', // TODO: translate }; diff --git a/src/nginxconfig/i18n/ru/templates/domain_sections/reverse_proxy.js b/src/nginxconfig/i18n/ru/templates/domain_sections/reverse_proxy.js index 3b5ccb1..728aa5a 100644 --- a/src/nginxconfig/i18n/ru/templates/domain_sections/reverse_proxy.js +++ b/src/nginxconfig/i18n/ru/templates/domain_sections/reverse_proxy.js @@ -31,5 +31,5 @@ export default { reverseProxyCannotBeEnabledWithPhp: `${common.reverseProxy} не может быть включен, пока включен ${common.php}.`, reverseProxyCannotBeEnabledWithPython: `${common.reverseProxy} не может быть включен, пока включен ${common.python}.`, enableReverseProxy: `${common.enable} ${common.reverseProxyLower}`, - proxyHeaderOverride: 'Proxy header override', // TODO: translate + proxyHostHeader: 'Proxy Host header', // TODO: translate }; diff --git a/src/nginxconfig/i18n/zh-cn/templates/domain_sections/reverse_proxy.js b/src/nginxconfig/i18n/zh-cn/templates/domain_sections/reverse_proxy.js index 9337b9e..f5c161f 100644 --- a/src/nginxconfig/i18n/zh-cn/templates/domain_sections/reverse_proxy.js +++ b/src/nginxconfig/i18n/zh-cn/templates/domain_sections/reverse_proxy.js @@ -31,5 +31,5 @@ export default { reverseProxyCannotBeEnabledWithPhp: `${common.reverseProxy}在启用${common.php}时无法启用。`, reverseProxyCannotBeEnabledWithPython: `${common.reverseProxy}在启用${common.python}时无法启用。`, enableReverseProxy: `${common.enable} ${common.reverseProxyLower}`, - proxyHeaderOverride: 'Proxy header override', // TODO: translate + proxyHostHeader: 'Proxy Host header', // TODO: translate }; diff --git a/src/nginxconfig/i18n/zh-tw/templates/domain_sections/reverse_proxy.js b/src/nginxconfig/i18n/zh-tw/templates/domain_sections/reverse_proxy.js index be2a781..14adbf0 100644 --- a/src/nginxconfig/i18n/zh-tw/templates/domain_sections/reverse_proxy.js +++ b/src/nginxconfig/i18n/zh-tw/templates/domain_sections/reverse_proxy.js @@ -31,5 +31,5 @@ export default { reverseProxyCannotBeEnabledWithPhp: `${common.reverseProxy} 在啟用 ${common.php} 時無法啟用。`, reverseProxyCannotBeEnabledWithPython: `${common.reverseProxy} 在啟用 ${common.python} 時無法啟用。`, enableReverseProxy: `${common.enable}${common.reverseProxyLower}`, - proxyHeaderOverride: 'Proxy header override', // TODO: translate + proxyHostHeader: 'Proxy Host header', // TODO: translate }; diff --git a/src/nginxconfig/templates/domain_sections/reverse_proxy.vue b/src/nginxconfig/templates/domain_sections/reverse_proxy.vue index eaabe3c..34a13b7 100644 --- a/src/nginxconfig/templates/domain_sections/reverse_proxy.vue +++ b/src/nginxconfig/templates/domain_sections/reverse_proxy.vue @@ -100,18 +100,18 @@ THE SOFTWARE. -
+
-
+
@@ -138,7 +138,7 @@ THE SOFTWARE. default: 'http://127.0.0.1:3000', enabled: false, }, - proxyHeaderOverride: { + proxyHostHeader: { default: '$host', enabled: false, }, @@ -179,15 +179,15 @@ THE SOFTWARE. this.$props.data.path.computed = this.$props.data.path.value; this.$props.data.proxyPass.enabled = true; this.$props.data.proxyPass.computed = this.$props.data.proxyPass.value; - this.$props.data.proxyHeaderOverride.enabled = true; - this.$props.data.proxyHeaderOverride.computed = this.$props.data.proxyHeaderOverride.value; + this.$props.data.proxyHostHeader.enabled = true; + this.$props.data.proxyHostHeader.computed = this.$props.data.proxyHostHeader.value; } else { this.$props.data.path.enabled = false; this.$props.data.path.computed = ''; this.$props.data.proxyPass.enabled = false; this.$props.data.proxyPass.computed = ''; - this.$props.data.proxyHeaderOverride.enabled = false; - this.$props.data.proxyHeaderOverride.computed = ''; + this.$props.data.proxyHostHeader.enabled = false; + this.$props.data.proxyHostHeader.computed = ''; } }, deep: true,