Hello everybody,
it seems that that basic auth is not functional in node http-request.
I use http-request to control und get status from VLC via its Webinterface.
With update from Version 1.3 to 2.1.4 my flows stoped working and debug-node shows http status 401 not authorized.
So I tried the direct URL something like
http://:secret@localhost:8080/requests/status.json
and second the „Basic Authentication“ in config of the http-request node itself.
Both do not work anymore. VLC is some kind of special, because you have set a password in order to enable the Webinterface, but user name is left blank.
The Issue could be related to issue HTTP Request Node, Basic Authentication returns 401 error after NR2.1 upgrade · Issue #3235 · node-red/node-red · GitHub
Thank you in advance and kind regards.
For reconstruction start a VLC with Webinterface, on a Linux System with
cvlc -A alsa --no-dbus -I http --http-host localhost --http-port 8080 --http-password secret udp://@:1234
And use following example-flow
[
{
"id": "5964a30c8887d9c8",
"type": "tab",
"label": "Test",
"disabled": false,
"info": "",
"env": []
},
{
"id": "d3a4f6238526c582",
"type": "inject",
"z": "5964a30c8887d9c8",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 140,
"y": 120,
"wires": [
[
"8d5324ec5271d9e1"
]
]
},
{
"id": "8d5324ec5271d9e1",
"type": "http request",
"z": "5964a30c8887d9c8",
"name": "VLC Status",
"method": "GET",
"ret": "txt",
"paytoqs": "ignore",
"url": "http://localhost:8080/requests/status.json",
"tls": "",
"persist": false,
"proxy": "",
"authType": "basic",
"senderr": false,
"x": 400,
"y": 120,
"wires": [
[
"40a0d2db8a3b1448"
]
]
},
{
"id": "40a0d2db8a3b1448",
"type": "debug",
"z": "5964a30c8887d9c8",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 590,
"y": 120,
"wires": []
}
]
Environment
npm 8.1.2
Node-RED Version: v2.1.4
Node.js Version: v16.13.1
Host: RaspPi 3B bullseye