github.com/hellofresh/janus@v0.0.0-20230925145208-ce8de8183c67/docs/proxy/wildcard_hostnames.md (about)

     1  #### Using wildcard hostnames
     2  
     3  To provide flexibility, Janus allows you to specify hostnames with wildcards in the hosts field. Wildcard hostnames allow any matching Host header to satisfy the condition, and thus match a given API.
     4  
     5  Wildcard hostnames must contain only one asterisk at the leftmost or rightmost label of the domain. Examples:
     6  
     7  `*.example.org` would allow Host values such as `a.example.com` and `x.y.example.com` to match.
     8  `example.*` would allow Host values such as `example.com` and `example.org` to match.
     9  A complete example would look like this:
    10  
    11  ```json
    12  {
    13      "name": "My API",
    14      "hosts": ["*.example.com", "service.com"]
    15  }
    16  ```
    17  
    18  Which would allow the following requests to match this API:
    19  
    20  ```http
    21  GET / HTTP/1.1
    22  Host: an.example.com
    23  ```
    24  
    25  ```http
    26  GET / HTTP/1.1
    27  Host: service.com
    28  ```