-
Couldn't load subscription status.
- Fork 3.3k
Description
Is your feature request related to a problem? Please describe.
The problem if any, is my own OCD & lazyness.
Software like Treafik and JWilder's nginx proxy all have the ability to automatically route to a docker-container based on a label or env flag.
My goal would be to have similar behaviour in nginx-proxy-manager so i tried implementing something like that.
However I cant seem to be able to POST to the API.
Describe the solution you'd like
As far as i can tell it should be possible to do a POST request to /api/nginx/proxy-hosts
{
"domain_names": ["VOORBEELDDDDDD"],
"forward_scheme":"http",
"forward_host":"10.13.37.128",
"forward_port":5000,
"access_list_id":"0",
"certificate_id":0,
"advanced_config":"",
"locations":[],
"block_exploits":false,
"caching_enabled":false,
"allow_websocket_upgrade":false,
"http2_support":false,
"hsts_enabled":false,
"hsts_subdomains":false,
"ssl_forced":false
}Is telling me i miss a token, fair enough. however if i try to post to http://server:3081/tokens it also tells me to get lost.
HTTP/1.1 405 Not Allowed
Connection: keep-alive
Content-Length: 154
Content-Type: text/html
Date: Wed, 15 Jul 2020 20:22:30 GMT
Server: openresty
Any way to get this up and running?
Describe alternatives you've considered
Snooping around in the code. but cant seem to find why one would do this
Update: one should use the /api/tokens/ to get the token. now lets try to create a host again. will update asap
Update: I can now create a vhost from a shell, so i should be able to manage it from my Docker events. Is there any interrest for a PR ?