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

Add exceptions for Top Level Domains (TLD) #351

Open
fraserc12 opened this issue Feb 6, 2020 · 3 comments
Open

Add exceptions for Top Level Domains (TLD) #351

fraserc12 opened this issue Feb 6, 2020 · 3 comments

Comments

@fraserc12
Copy link

This is my config file:

{
  "port": 2000,
  "host": "127.0.0.1",
  "timeout": 5000,
  "tld": "dev.appname.org",
  "proxy": false
}

This work great as we deploy a couple applications locally and access using
https://local.dev.appname.org for example

Problem:
We have an application deployed on a remote server we access that has the domain
https://sandbox.dev.appname.org

Which will obviously try route through Hotel when we try to access it locally and causes a server not defined error

Question:
Is there a way to add an exclusion to the tld configuration? So that we can keep our current set up and still have Hotel running?

Thanks

@j-f1
Copy link
Contributor

j-f1 commented Feb 8, 2020

If you know the IP address for that server, you could set up a proxy from sandbox to that IP address.

@fraserc12
Copy link
Author

fraserc12 commented May 14, 2020

@j-f1 What would be ideal, for us, is to have an extra attibute in the conf.json, something like "excludeFromTLD" - which would be a list in our case.

And then make a change in the src/daemon/views/proxy-pac.pug file to use that value as a conditon (when comparing the host and '.#{conf.tld}')
and return 'REDIRECT' rather than 'PROXY 127.0.0.1:#{conf.port}'

Would that be something you would consider looking at if I submitted a PR?

Apologies for delay in replying, this recently came up again within our development team as an issue.

@j-f1
Copy link
Contributor

j-f1 commented May 16, 2020

I’m not actually a maintainer of this repo, so I think you’d be better off forking hotel for yourself and making the changes you need.

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

No branches or pull requests

2 participants