Merge pull request #903 from ogarai/edit-disabled-host

Prevent activating nginx config after editing disabled proxy host
This commit is contained in:
jc21 2021-03-17 08:32:14 +10:00 committed by GitHub
commit c9c53d9670
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -189,6 +189,10 @@ const internalProxyHost = {
expand: ['owner', 'certificate', 'access_list.[clients,items]']
})
.then((row) => {
if (!row.enabled) {
// No need to add nginx config if host is disabled
return row;
}
// Configure nginx
return internalNginx.configure(proxyHostModel, 'proxy_host', row)
.then((new_meta) => {