[GH-ISSUE #516] force ssl & HTTP/2 flags not honored in initial creation #438

Open
opened 2026-02-26 06:32:51 +03:00 by kerem · 10 comments
Owner

Originally created by @TWhidden on GitHub (Jul 20, 2020).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/516

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":"support@mydomain.com",
      "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":"support@mydomain.com",
      "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
.

Originally created by @TWhidden on GitHub (Jul 20, 2020). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/516 **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":"support@mydomain.com", "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":"support@mydomain.com", "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](https://user-images.githubusercontent.com/9921122/87995122-8353ab00-caa3-11ea-9f98-b8598ba4ff10.png) 2.) Request New Certificate: ![image](https://user-images.githubusercontent.com/9921122/87995160-99fa0200-caa3-11ea-9fd4-294706c8be13.png) 3.) Result once proxy has been created with cert. ![image](https://user-images.githubusercontent.com/9921122/87995210-b8f89400-caa3-11ea-8a31-52b3c2845189.png) **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 .
Author
Owner

@netstx commented on GitHub (Aug 1, 2020):

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.

<!-- gh-comment-id:667463741 --> @netstx commented on GitHub (Aug 1, 2020): 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.
Author
Owner

@RichardDern commented on GitHub (Oct 28, 2020):

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.

<!-- gh-comment-id:718268217 --> @RichardDern commented on GitHub (Oct 28, 2020): 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.
Author
Owner

@planctron commented on GitHub (Sep 29, 2021):

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.

<!-- gh-comment-id:930007378 --> @planctron commented on GitHub (Sep 29, 2021): 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.
Author
Owner

@ma-karai commented on GitHub (Nov 16, 2021):

is there an update to this bug

<!-- gh-comment-id:969871217 --> @ma-karai commented on GitHub (Nov 16, 2021): is there an update to this bug
Author
Owner

@dinbtechit commented on GitHub (Jul 13, 2023):

Same issue..

<!-- gh-comment-id:1634995099 --> @dinbtechit commented on GitHub (Jul 13, 2023): Same issue..
Author
Owner

@github-actions[bot] commented on GitHub (Mar 27, 2024):

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

<!-- gh-comment-id:2021774964 --> @github-actions[bot] commented on GitHub (Mar 27, 2024): Issue is now considered stale. If you want to keep it open, please comment :+1:
Author
Owner

@schnillerman commented on GitHub (Aug 5, 2024):

This is still the case in 2.11.3

<!-- gh-comment-id:2268583579 --> @schnillerman commented on GitHub (Aug 5, 2024): This is still the case in 2.11.3
Author
Owner

@github-actions[bot] commented on GitHub (May 7, 2025):

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

<!-- gh-comment-id:2856819578 --> @github-actions[bot] commented on GitHub (May 7, 2025): Issue is now considered stale. If you want to keep it open, please comment :+1:
Author
Owner

@schnillerman commented on GitHub (May 14, 2025):

Still not working

<!-- gh-comment-id:2881251079 --> @schnillerman commented on GitHub (May 14, 2025): Still not working
Author
Owner

@delta0815 commented on GitHub (Nov 12, 2025):

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

<!-- gh-comment-id:3521751023 --> @delta0815 commented on GitHub (Nov 12, 2025): Still the case with v2.13.3 (which apart from the issue looks lovely)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#438
No description provided.