Any home lab nerd can likely recognize this scenario.
I have node-red running in my network and the
- https://node-red/ url goes to the editor, which I do NOT want exposed
- https://node-red/ui url goes to the dashboard that I do want exposed.
So I created a file provider route that looks like this:
http:
routers:
nodered-router:
rule: "Host(`nr.my.domain`) && PathPrefix(`/ui`)"
service: nodered-service
priority: 1000
entryPoints:
- websecure
tls:
certResolver: production
middlewares:
- authentik@file
services:
nodered-service:
loadBalancer:
servers:
- url: "http://192.168.1.167:1880/ui/"
So, this kind of works the way I want. If anyone goes to the url ending in /ui they get in. Any other path gets a bad gateway. Minimally ok.
Better I would like to take any external inbounds to any path and just route internally to the http://192.168.1.167:1880/ui/ url.
http:
routers:
nodered-router:
rule: "Host(`nr.my.domain`)
service: nodered-service
priority: 1000
entryPoints:
- websecure
tls:
certResolver: production
middlewares:
- authentik@file
services:
nodered-service:
loadBalancer:
servers:
- url: "http://192.168.1.167:1880/ui/"
This I cannot get to work. This attempt is not doing what I expect. Why are connections not trapping all url/path hits and sending them to the specific http://192.168.1.167:1880/ui/