When disabling and re-enabling SSL for Website, Wrong Redirect settings are applied

SYSTEM INFORMATION
OS type and version Debian 13
Webmin version 2.621
Virtualmin version 8.0.1
Webserver version REQUIRED
Related packages SUGGESTED

After re-enabling SSL for Website (a sub-server in my case with certificate sharing enabled) the redirect to SSL directive now includes HTTPS as source, resulting in a redirect loop when opening the website via https and effectively making the website unreachable.

Steps to reproduce:

  • Disable SSL for Website
  • Enable SSL for Website

Expected behaviour:
SSL redirect should only be applied to HTTP, not HTTPS