Skip to content

Account for possible trailing dot in domain name matching #14748

Closed

Description

@boringuy

Title: Account for possible trailing dot in domain name matching

Description:
"example.com" is the relative domain name
"example.com." is the absolute domain name
"http://example.com/" and "http://example.com./" are equivalent but when setting up the "domains" field under VirtualHosts, one needs to explicitly specify "domains: ["example.com", "example.com."]" for the match to work.
It would be nice that both the domain name in the yaml config and in the host/:authority header be normalized before matching so one does not need to explicitly specify both form of the same domain name.

[optional Relevant Links:]
http://www.dns-sd.org/trailingdotsindomainnames.html

Activity

  1. added
    enhancement
    triage
    on Jan 19, 2021
  2. added and removed
    enhancement
    triage
    on Jan 31, 2021
  3. github-actions commented on Mar 3, 2021

    @github-actions

    This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.

  4. added
    stale
    on Mar 3, 2021
  5. cretz commented on Mar 3, 2021

    @cretz
    Contributor

    Bump. Right now our control plane duplicates every vhost domain with an appended dot to get around this. I suspect we'd opt in to this with a strip_trailing_host_dot akin to what strip_matching_host_port already does to preserve existing behavior. Thoughts? I may be able to send in PR if that approach is acceptable.

  6. removed
    stale
    on Mar 3, 2021
  7. mattklein123 commented on Mar 3, 2021

    @mattklein123
    Member

    I suspect we'd opt in to this with a strip_trailing_host_dot akin to what strip_matching_host_port already does to preserve existing behavior. Thoughts? I may be able to send in PR if that approach is acceptable.

    Yeah that makes sense to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions