Open raintonr opened 7 months ago
Hm ... normally the "route" parameter should allow exactly this already... https://github.com/ioBroker/ioBroker.proxy/blob/master/lib/proxy.js#L43 ... does that not work?
The configuration instructions say:
Route path: Path for proxy. If "/proxy.0", so the routes will be available under
http://webIP:8082/proxy.0/...
Are you saying this is optional and if one sets the Route path to blank they can forward any path?
If the Route path is indeed configurable on a per-instance basis, that has consequences for #134. Either a rule would need the ability to override the Route path, or an intermediary library, when called to setup an automatic rule, would need to seek out a proxy which has a compatible Route path, port, etc. and throw an error if none is found.
When I read the linked code then, no "empty" will not work, but a "/" should work ... Then the route would be "empty" after it because a trailing slash gets removed
Currently it seems that all proxy paths must exist under a 'root' path that includes the adapter number. Ie,
/proxy.0/...
This is not ideal as some external services have fixed paths that must be routed. Ie. imagine one wants to route ACME challenge requests that come to
http://<host>/.well-known/acme-challenge/...
Indeed, this restriction is known and noted as not ideal in the Adapter documentation ("Not all devices can be accessed via proxy.") so would be useful to remove such a restriction.
As part of this allowing host/name based forwarding might also be very useful.