Details
-
Type:
New Feature
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 7.0.0pre3, 6.1.12.rc2
-
Fix Version/s: 7.0.0pre4, 6.1.12.rc3
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
it should be great if we could use wildcard to define virtual host.
<Configure class="org.mortbay.jetty.webapp.WebAppContext"> <Set name="VirtualHosts"> <Array type="java.lang.String"> <Item>*.mydomain.com</Item>
I presume it is technically quite easy to implement. but we need to decide whether we'll it's simple wildcard or a full regex, e.g.
- only support wildcard at the beginning and end, when * is detected, if it's in the first character, then use startsWith and endsWith to match, or
- it's even better if any regex character is detected, including +,*,?,{,}, then treat the string as regex to match
the relevant discuss as as follow:
http://archive.codehaus.org/lists/org.codehaus.jetty.user/msg/bc1833ba0809151359v674995bdj943502c26a9ac06e@mail.gmail.com
Wildcard would lead to easier syntax than regex;
".mydomain.com" versus "(.)
.mydomain.com" for (I believe) the most common case.
I think it would be good to follow it the way that DNS does, so wildcard only applies leftmost, and only for subdomains, but not subdomains of subdomains. So ".mydomain.com" would match "foo.mydomain.com" but not "foo.bar.mydomain.com". If you want to match that, you'll need ".bar.mydomain.com".
What use case do you have in mind for a wildcard at the end?
.mydomain.com" for (I believe) the most common case. I think it would be good to follow it the way that DNS does, so wildcard only applies leftmost, and only for subdomains, but not subdomains of subdomains. So ".mydomain.com" would match "foo.mydomain.com" but not "foo.bar.mydomain.com". If you want to match that, you'll need ".bar.mydomain.com". What use case do you have in mind for a wildcard at the end?