NginxProxyManager / NginxProxyManager/nginx-proxy-manager
force ssl & HTTP/2 flags not honored in initial creation
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 34.2k
- Forks
- 3.9k
- Avg merge
- 21h 12m
- Merged PRs (30d)
- 20
Description
Checklist
- Have you pulled and found the error with
jc21/nginx-proxy-manager:latestdocker 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

2.) Request New Certificate:

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

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
.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the proxy-host creation API request from the issue, including ssl_forced and http2_support, and compare the request with the returned values. Trace the initial creation handling until you find where these two flags are persisted or applied. Done means a single creation request returns and applies both flags without a second update call.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nginx, typescript
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100