nginx-proxy-manager icon indicating copy to clipboard operation
nginx-proxy-manager copied to clipboard

force ssl & HTTP/2 flags not honored in initial creation

Open TWhidden opened this issue 5 years ago • 10 comments

Checklist

  • Have you pulled and found the error with jc21/nginx-proxy-manager:latest docker image? yes
  • Are you sure you're not using someone else's docker image? yes
  • If having problems with Lets Encrypt, have you made absolutely sure your site is accessible from outside of your network? no problems

Describe the bug When creating a new proxy - the Force SSL / HTTP/2 Support does not get applied initially and requires going back in and setting it after the proxy has been created. I have an automation script running, so that means another API call.

Input:

{
   "domain_names":[
      "test2.mydomain.com"
   ],
   "forward_scheme":"http",
   "forward_host":"someinternaladdress",
   "forward_port":5555,
   "block_exploits":true,
   "allow_websocket_upgrade":true,
   "access_list_id":"0",
   "certificate_id":"new",
   "ssl_forced":true,
   "http2_support":true,
   "meta":{
      "letsencrypt_email":"[email protected]",
      "letsencrypt_agree":true
   },
   "advanced_config":"",
   "locations":[

   ],
   "caching_enabled":false,
   "hsts_enabled":false,
   "hsts_subdomains":false
}

JSON fields

   "ssl_forced":true,
   "http2_support":true,

with the resulting response:

{
   "id":22,
   "created_on":"2020-07-20T23:00:12.000Z",
   "modified_on":"2020-07-20T23:00:41.000Z",
   "owner_user_id":1,
   "domain_names":[
      "test2.mydomain.com"
   ],
   "forward_host":"someinternaladdress",
   "forward_port":5555,
   "access_list_id":0,
   "certificate_id":22,
   "ssl_forced":0,
   "caching_enabled":0,
   "block_exploits":1,
   "advanced_config":"",
   "meta":{
      "letsencrypt_email":"[email protected]",
      "letsencrypt_agree":true,
      "nginx_online":true,
      "nginx_err":null
   },
   "allow_websocket_upgrade":1,
   "http2_support":0,
   "forward_scheme":"http",
   "enabled":1,
   "locations":[

   ],
   "hsts_enabled":0,
   "hsts_subdomains":0,
   "certificate":{
      "owner_user_id":1,
      "provider":"letsencrypt",
      "nice_name":"test2.mydomain.com",
      "domain_names":[
         "test2.mydomain.com"
      ],
      "expires_on":"2020-10-18T22:00:38.000Z",
      "meta":{

      }
   },
   "owner":{
      "is_disabled":0,
      "name":"Admin",
      "nickname":"Admin",
      "avatar":"//www.gravatar.com/avatar/c7a?default=mm"
   },
   "access_list":null,
   "use_default_location":true,
   "ipv6":false
}

JSON Result:

 "ssl_forced":0,
 "http2_support":0,
  • What version of Nginx Proxy Manager is reported on the login page? 2.3.1

To Reproduce Steps to reproduce the behavior: 1.) Add Proxy Host image

2.) Request New Certificate:

image

3.) Result once proxy has been created with cert. image

Expected behavior Expected that the bool values would be applied at initial api post, and not a second call to enable those two flags.

Operating System -- Ubuntu 20.04 LTS .

TWhidden avatar Jul 20 '20 23:07 TWhidden

I can confirm this is an issue when creating new proxy hosts, currently on latest version (2.3.1) running on docker (latest) on Debian 10.4.

netstx avatar Aug 01 '20 03:08 netstx

Same here: Force SSL, HTTP/2 support, HSTS are not saved during new host creation. I need to edit the host to enable these options.

Same problem occurs with redirection hosts.

RichardDern avatar Oct 28 '20 23:10 RichardDern

This bug is critical. It may not, like in my case, be visible to the developer. My customers report an "unsafe page". The redirection fails.

planctron avatar Sep 29 '21 09:09 planctron

is there an update to this bug

ma-karai avatar Nov 16 '21 05:11 ma-karai

Same issue..

dinbtechit avatar Jul 13 '23 22:07 dinbtechit

Issue is now considered stale. If you want to keep it open, please comment :+1:

github-actions[bot] avatar Mar 27 '24 01:03 github-actions[bot]

This is still the case in 2.11.3

schnillerman avatar Aug 05 '24 09:08 schnillerman

Issue is now considered stale. If you want to keep it open, please comment :+1:

github-actions[bot] avatar May 07 '25 02:05 github-actions[bot]

Still not working

schnillerman avatar May 14 '25 19:05 schnillerman

Still the case with v2.13.3 (which apart from the issue looks lovely)

delta0815 avatar Nov 12 '25 12:11 delta0815