From 8a33c2782dd9d9a16bfb8707935534206bbd5fc0 Mon Sep 17 00:00:00 2001 From: Nikola Jokic Date: Wed, 13 May 2026 00:09:08 +0200 Subject: [PATCH] Do not use EqualFold when checking u.Host --- github/actions/actions.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/github/actions/actions.go b/github/actions/actions.go index 50f23213..7a93c457 100644 --- a/github/actions/actions.go +++ b/github/actions/actions.go @@ -85,7 +85,7 @@ func (c *GitHubConfig) GitHubAPIURL(path string) *url.URL { result.Host = fmt.Sprintf("api.%s", c.ConfigURL.Host) result.Path = "" - if strings.EqualFold("www.github.com", c.ConfigURL.Host) { + if c.ConfigURL.Host == "www.github.com" { // re-routing www.github.com to api.github.com result.Host = "api.github.com" } @@ -102,8 +102,8 @@ func isHostedGitHubURL(u *url.URL) bool { return false } - return strings.EqualFold(u.Host, "github.com") || - strings.EqualFold(u.Host, "www.github.com") || - strings.EqualFold(u.Host, "github.localhost") || + return u.Host == "github.com" || + u.Host == "www.github.com" || + u.Host == "github.localhost" || strings.HasSuffix(u.Host, ".ghe.com") }