httpNodeRoot: '/node-red/nodes',
httpNodeAuth: {user:"thing",pass:"<hash>"},
curl -u 'thing:<pass>' -v https://example.com/node-red/nodes/shopping-list # HTTP 401
curl -u 'thing:<pass>' -v https://example.com/node-red/nodes/shopping-list/ # HTTP 200
Even though the UI shows the node box with: "[get] /node-red/nodes/shopping-list"
The UI show show the path that should be used.
[
{
"id": "8c5ba4352c53422d",
"type": "http response",
"z": "1a16bf399092c8c7",
"name": "",
"statusCode": "",
"headers": {},
"x": 490,
"y": 40,
"wires": []
},
{
"id": "a50ccac34021291e",
"type": "debug",
"z": "1a16bf399092c8c7",
"name": "http",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 490,
"y": 80,
"wires": []
},
{
"id": "3fc14dfbd15e4913",
"type": "http in",
"z": "1a16bf399092c8c7",
"name": "",
"url": "/shopping-list",
"method": "get",
"upload": false,
"skipBodyParsing": false,
"swaggerDoc": "",
"x": 180,
"y": 40,
"wires": [
[
"8c5ba4352c53422d",
"a50ccac34021291e"
]
]
}
]
location /node-red {
return 301 /node-red/;
}
location /node-red/ {
proxy_pass http://127.0.0.1:1880;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $hostname;
}
Current Behavior
Given settings.js contains:
Requests only work if the path has a trailing slash:
Even though the UI shows the node box with: "[get] /node-red/nodes/shopping-list"
Expected Behavior
The UI show show the path that should be used.
Steps To Reproduce
Create a trivial HTTP In node with method="GET" and URL="/shopping-list"
Example flow
Environment
nodered/node-red:4.1.8docker image.Nginx config: