我正在使用的节点RED安装在一个Ubuntu容器的顶部。
(我没有创建此容器,也不能修改它。)
我想用一个简单的httpget请求创建一个流到同一个docker网络上的另一个容器,但是我一直得到一个403禁止的错误。
[{"id":"332622ed.d87fbe","type":"http request","z":"8431aef4.eba67","name":"","method":"GET","ret":"txt","url":"http://172.16.0.5:8080/path/to/something","tls":"","x":890,"y":700,"wires":[["f49e6445.15d988"]]},{"id":"277f03cb.536f8c","type":"inject","z":"8431aef4.eba67","name":"","topic":"","payload":"","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":730,"y":700,"wires":[["332622ed.d87fbe"]]},{"id":"f49e6445.15d988","type":"debug","z":"8431aef4.eba67","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":1050,"y":700,"wires":[]}]
i、 e.通过:
docker exec -it ubuntu_nodered bash
curl âX GET "http://172.16.0.5:8080/path/to/something"
curl âX GET --noproxy "*" "http://172.16.0.5:8080/path/to/something"
唉,我得到了这个命令的正确回应。
如何使流中的HTTP请求不使用172.16.0.x上请求所处环境中的代理设置?