Jetty
  1. Jetty
  2. JETTY-721

Support wildcard in VirtualHosts configuration

    Details

    • Type: New Feature New Feature
    • Status: Resolved Resolved
    • Priority: Major 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 :
      3

      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

      1. jetty721.diff
        4 kB
        Athena Yao
      2. jetty-721-6.diff
        9 kB
        Athena Yao
      3. jetty-721-7.diff
        6 kB
        Athena Yao

        Activity

          People

          • Assignee:
            Athena Yao
            Reporter:
            Mingfai Ma
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: