Skip to content

Commit

Permalink
Add .internal to internal-only hostnames
Browse files Browse the repository at this point in the history
  • Loading branch information
nickubels committed Aug 5, 2024
1 parent 1a2275d commit a53ff64
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions certificates.go
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,7 @@ func SubjectIsInternal(subj string) bool {
return subj == "localhost" ||
strings.HasSuffix(subj, ".localhost") ||
strings.HasSuffix(subj, ".local") ||
strings.HasSuffix(subj, ".internal") ||
strings.HasSuffix(subj, ".home.arpa") ||
isInternalIP(subj)
}
Expand Down
2 changes: 2 additions & 0 deletions certificates_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ func TestSubjectQualifiesForPublicCert(t *testing.T) {
{"local", true},
{"foo.local", false},
{"foo.bar.local", false},
{"foo.internal", false},
{"foo.bar.internal", false},
{"foo.home.arpa", false},
{"foo.bar.home.arpa", false},
{"192.168.1.3", false},
Expand Down

0 comments on commit a53ff64

Please sign in to comment.