NginxProxyManager / nginx-proxy-manager

Docker container for managing Nginx proxy hosts with a simple, powerful interface
https://nginxproxymanager.com
MIT License
23.18k stars 2.69k forks source link

'force HTTPS' switch not recognized when creating new (proxy) host #3737

Open shakebox opened 6 months ago

shakebox commented 6 months ago

Checklist

Describe the bug When creating new (proxy, haven't tested others) host and you turn on the 'force HTTPS' switch, this setting will not be stored. You need to re-enable it manually by doing "edit" on the same host afterwards. Only then the activation of this switch is actually doing something!

Nginx Proxy Manager Version 2.11.1

To Reproduce Steps to reproduce the behavior:

  1. press 'add proxy host'
  2. fill in the details and switch to the 'TLS' tab
  3. set the cert or set to 'request a new TLS certificate', then TURN ON the 'force HTTPS' button
  4. save and wait until you have new host created
  5. go to 'edit' for this newly created host
  6. go to TLS tab and see that the 'force HTTPS' button is NOT active

Expected behavior when turning on any of the options switches while creating a new host, I'd expect it 'to do something' and not being ignored. For newbie users it may be dangerous because they may rely on the switch to behave as expected and never check the settings again after the initial creation.

Screenshots

Operating System Ubuntu 22.04

Additional context i was told from a fork user that it may be related to this: https://github.com/NginxProxyManager/nginx-proxy-manager/blob/79cd0c5294f1e3ad4cc9ed5187b7759808b91162/backend/internal/host.js#L22 as this is also called for new hosts and therefore the ssl_forced is always set to 'false'!?

manilx commented 6 months ago

I have found the same issue. This has been fine on older versions, as I'm not adding new entries all the time I just found this now.

code-a-cola commented 5 months ago

happening to me as well