I've been strugling with this for a couple of days now..
Tried a method setting a cookie with a username value, but IIS Response Header (where I set the cookie) seems to be unaware of any server variables. Cookie values are always empty (or not interpreted: {HTTP_REMOTE_USER} is the value of the cookie).
After changing the IIS authentication to Basic I can now see the Authorization Request Header in my browser (Developer Tools). However, when I trigger the test flow, the HTTP-In result does not contain a req.header.
If I'm reader the docs correctly, req.header should contain the browser request header info. But I'm getting nowhere..
Obviously the mDashboard form is triggered on another machine that has access to mDashboard. Tested with Firefox and Edge, no difference in behaviour.
Node.JS version = 18.12.1
Node-RED version = 3.0.2
Node versions all up to date (23-04-17)
Again, any help is greatly appreciated!
Thanks, DenW
PS: this is the test flow i'm using (using mDashboard, but changing the form to a Dashboard one would work fine):
[
{
"id": "59ff2a1.fa600d4",
"type": "http in",
"z": "a7c3cbaf02fdf2a9",
"name": "",
"url": "/hello",
"method": "post",
"upload": false,
"swaggerDoc": "",
"x": 870,
"y": 180,
"wires": [
[
"54c1e70d.ab3e18",
"907c1ea16513051b"
]
]
},
{
"id": "54c1e70d.ab3e18",
"type": "template",
"z": "a7c3cbaf02fdf2a9",
"name": "page",
"field": "payload",
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
"template": "<html>\n <head></head>\n <body>\n <h1>Hello World!</h1>\n <h1>Headers: {{msg.req.headers.authorization}}</h1>\n </body>\n</html>",
"x": 1270,
"y": 140,
"wires": [
[
"266c286f.d993d8",
"5850e296a83e3a7d"
]
]
},
{
"id": "266c286f.d993d8",
"type": "http response",
"z": "a7c3cbaf02fdf2a9",
"name": "",
"statusCode": "",
"headers": {},
"x": 1490,
"y": 140,
"wires": []
},
{
"id": "d413a6424598b4df",
"type": "http request",
"z": "a7c3cbaf02fdf2a9",
"name": "",
"method": "POST",
"ret": "txt",
"paytoqs": "body",
"url": "127.0.0.1:1881/hello",
"tls": "",
"persist": true,
"proxy": "",
"insecureHTTPParser": true,
"authType": "",
"senderr": false,
"headers": [
{
"keyType": "Content-Type",
"keyValue": "",
"valueType": "other",
"valueValue": "text/plain"
}
],
"x": 750,
"y": 80,
"wires": [
[
"55e4572e284dc994"
]
]
},
{
"id": "37d37b76e17d57a7",
"type": "inject",
"z": "a7c3cbaf02fdf2a9",
"name": "",
"props": [
{
"p": "payload.text",
"v": "Hoi Den!",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"x": 530,
"y": 80,
"wires": [
[
"d413a6424598b4df"
]
]
},
{
"id": "55e4572e284dc994",
"type": "debug",
"z": "a7c3cbaf02fdf2a9",
"name": "debug 3",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 980,
"y": 80,
"wires": []
},
{
"id": "5850e296a83e3a7d",
"type": "debug",
"z": "a7c3cbaf02fdf2a9",
"name": "debug 4",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1620,
"y": 280,
"wires": []
},
{
"id": "98393730990db149",
"type": "mui_form",
"z": "a7c3cbaf02fdf2a9",
"name": "",
"label": "",
"group": "e769dd829321faab",
"order": 0,
"width": 0,
"height": 0,
"options": [
{
"label": "Test",
"value": "test",
"type": "text",
"required": true,
"rows": null
}
],
"formValue": {
"test": ""
},
"payload": "",
"submit": "submit",
"cancel": "",
"topic": "",
"x": 530,
"y": 200,
"wires": [
[
"d413a6424598b4df"
]
]
},
{
"id": "907c1ea16513051b",
"type": "json",
"z": "a7c3cbaf02fdf2a9",
"d": true,
"name": "",
"property": "payload",
"action": "obj",
"pretty": false,
"x": 1290,
"y": 240,
"wires": [
[
"5850e296a83e3a7d"
]
]
},
{
"id": "e769dd829321faab",
"type": "mui_group",
"name": "mGroup 1",
"tab": "619fd859331557b7",
"order": 1,
"disp": true,
"width": 6
},
{
"id": "619fd859331557b7",
"type": "mui_tab",
"name": "Tab 1",
"icon": "dashboard",
"order": 1
}
]