Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix GHES hostname pattern check#675

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
jtquip88 wants to merge2 commits intogithub:main
base:main
Choose a base branch
Loading
fromjtquip88:fix_ghes_hostname

Conversation

jtquip88
Copy link

Currently, any hostname ending with "github.com" (such as "slack-github.com") is incorrectly identified as the public GitHub hostgithub.com.

This PR changes the public github hostname check from a suffix match to an exact match:

Before: strings.HasSuffix(u.Hostname(), "github.com")
After: u.Hostname() == "github.com"

This ensures that GHES hostnames like "slack-github.com" are correctly identified as GitHub Enterprise Server instances rather than being treated as the public GitHub.com.
Alternative approaches:

  1. I am not sure if public github hosts can have subdomains, but if needed a regex can be used to match host name patterns.
  2. Add extra optional parameter likeIS_GHES to explicitly indicate that this is a GHES instance.

Fixes#662

@jtquip88jtquip88 requested a review froma team as acode ownerJuly 12, 2025 15:59
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Custom GHES host names are not supported
1 participant
@jtquip88

[8]ページ先頭

©2009-2025 Movatter.jp