Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove requirement that paths be under '/proxy.0/...' #133

Open
raintonr opened this issue Feb 21, 2024 · 3 comments
Open

Remove requirement that paths be under '/proxy.0/...' #133

raintonr opened this issue Feb 21, 2024 · 3 comments
Labels

Comments

@raintonr
Copy link

raintonr commented Feb 21, 2024

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.

@Apollon77
Copy link
Collaborator

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?

@raintonr
Copy link
Author

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.

@Apollon77
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants