Nginx-proxy-manager: force ssl & HTTP/2 flags not honored in initial creation

Created on 21 Jul 2020  Â·  2Comments  Â·  Source: jc21/nginx-proxy-manager

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
.

bug

Most helpful comment

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.

All 2 comments

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.

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ck003 picture ck003  Â·  6Comments

Treppengelaender picture Treppengelaender  Â·  6Comments

scv-m picture scv-m  Â·  5Comments

Kranzy picture Kranzy  Â·  7Comments

Sigri44 picture Sigri44  Â·  3Comments