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 vhost name based activation strategy #88

Closed
wants to merge 1 commit into from

Conversation

szpak
Copy link
Contributor

@szpak szpak commented May 12, 2014

The activation strategy that will use the Virtual Host (vhost) server name
used in the request to decide if the feature is active or not.
This strategy can be useful when given service instance is available through
two different Virtual Host names (vhosts like www.example.com and
beta.example.com) each with different features enabled.
By the way test dependencies update and unification.

I left one TODO - support for wildcard in domain name (like *.beta.example.com).
I don't use it and it would be rather rarely used. Nevertheless, if there was a demand
for this feature I could implement it.

Btw, I had problem with a name for this strategy. The current one sounded sensible
for my colleagues, but maybe you will have an idea for a better (more meaningful) one.

The activation strategy that will use the Virtual Host (vhost) server name
used in the request to decide if the feature is active or not.
This strategy can be useful when given service instance is available through
two different Virtual Host names (vhosts like www.example.com and
beta.example.com) each with different features enabled.
By the way test dependencies update and unification.
@chkal
Copy link
Member

chkal commented May 20, 2014

Hey! Awesome! Thanks a lot for this contribution!

Sorry that it took so long for me to answer. I was traveling and really really busy. So sorry about that.

I merged your pull request. It looks good. However I renamed the strategy to ServerNameActivationStrategy. I think this name is better because it corresponds to the Servlet API your are using (request.getServerName()). Please note that I also had to change the ID of the strategy. So if you already used you version of the strategy, you may have to alter the ID.

Thanks again! Great work! :)

@chkal chkal closed this May 20, 2014
@szpak szpak deleted the topic/vhostNames branch May 26, 2015 19:52
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