Added proxy template for support proxy request from nginx to another service

This commit is contained in:
Alexey Berezhok
2024-10-07 23:21:17 +03:00
parent 9d93d56a05
commit 3225e8cbea
10 changed files with 206 additions and 20 deletions

View File

@@ -53,6 +53,7 @@ export default function handleEditWebListeners() {
// show "Purge Nginx Cache" button if "caching" selected
const proxyTemplateSelect = document.querySelector('.js-proxy-template-select');
const clearCacheButton = document.querySelector('.js-clear-cache-button');
const proxyConnect = document.querySelector('.js-proxy-connect')
if (proxyTemplateSelect && clearCacheButton) {
proxyTemplateSelect.addEventListener('change', () => {
// NOTE: Match "caching" and "caching-*" values
@@ -63,4 +64,16 @@ export default function handleEditWebListeners() {
}
});
}
if (proxyTemplateSelect && proxyConnect) {
proxyTemplateSelect.addEventListener('change', () => {
if (proxyTemplateSelect.value === "srvproxy") {
proxyConnect.style.display = 'block';
} else {
proxyConnect.style.display = 'none';
}
});
}
if (proxyTemplateSelect.value === "srvproxy") {
proxyConnect.style.display = 'block';
}
}