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

Support dns aliases #203

Closed
wants to merge 2 commits into from

Conversation

bhenderson
Copy link

Adds support for domain alias lookup. Fixes #202
Config now accepts a new directive: alias
Multiple aliases can be separated by a comma
Special characters are:
*: Will match one subpath
**: Will match any subpaths

Let me know what you think.

thanks,

Config now accepts a new directive: alias
Multiple aliases can be separated by a comma
Special characters are:
        *: Will match one subpath
        **: Will match any subpaths
@gnufied
Copy link
Contributor

gnufied commented Oct 19, 2017

Thank you for the PR. I will merge this shortly. I am just brooding over the way this is exposed in ini files and if there can be a better way.

Invoker.dns_cache = Invoker::DNSCache.new(nil)

match = rewriter.select_backend_config('baz.dev')
expect(match.port).to eql(2)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original domain is api.foo and specifying an alias of * takes over a unrelated domain baz.dev. So what happens if more than one entry specifies * alias?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right now, the first entry with * will match and any others will be ignored.

@gnufied
Copy link
Contributor

gnufied commented Dec 17, 2017

I am not sure about allowing wildcard implementation that allows "*" and enables user to take over a unrelated domain. It depends on order of processing and can be somewhat unpredictable.

May be we should consider disallowing "*" wildcard.

@bhenderson
Copy link
Author

thanks @gnufied for looking at it. I've lost interest in this feature (changed jobs) so feel free to close.

thanks,

@gnufied gnufied closed this Dec 18, 2017
@gnufied
Copy link
Contributor

gnufied commented Dec 18, 2017

@bhenderson thanks for opening the PR. Apologies about rather delayed review cycle. :(

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

Successfully merging this pull request may close these issues.

2 participants