Website Redirect Type: proxy re-sets to No redirect when switching tabs

short description

Switching tabs in administration of a web domain/website located on a server with Apache unexpectedly clears Redirect Type: proxy.

correct behaviour

Clicking around tabs with no other action shouldn't be changing the settings.

environment

Server OS: debian Server OS version: buster ISPConfig version: 3.2.2/dev

proposed fix

patch

--- interface/web/sites/templates/web_vhost_domain_redirect.htm	2021-03-03 18:40:13.303026968 +0100
+++ interface/web/sites/templates/web_vhost_domain_redirect.htm.apache_proxy_fix	2021-03-03 19:45:02.912625242 +0100
@@ -86,7 +86,7 @@
                 jQuery('#redirect_type option[value="redirect"]').hide();
                 jQuery('#redirect_type option[value="permanent"]').hide();
 				//jQuery('#redirect_type option[value="proxy"]').hide();
-                if(selected != "no" && selected != "" && selected != "R" && selected != "L" && selected != "R,L" && selected != "R=301,L") jQuery('#redirect_type option[value="no"]').attr('selected', 'selected');
+                if(selected != "no" && selected != "" && selected != "R" && selected != "L" && selected != "R,L" && selected != "R=301,L" && selected != "proxy") jQuery('#redirect_type option[value="no"]').attr('selected', 'selected');
 				jQuery('.nginx').hide();
             }
         });

references

bb00dc2d enables the proxy option, but seems not to include the newly-enabled option in the enumeration at the bottom of that block. Due to that, the No Redirect option is then being re-selected when re-opening the site configuration and switching tabs, changing from the configured "proxy" redirect type.

Thanks!

Edited by Petr Mifek