updating allowed hosts to include ghe.com

This commit is contained in:
eggyhead
2024-01-30 22:22:49 +00:00
parent 1a1d5e3792
commit 79886daf63
4 changed files with 20 additions and 12 deletions
+8 -4
View File
@@ -136,9 +136,13 @@ export function isGhes(): boolean {
process.env['GITHUB_SERVER_URL'] || 'https://github.com'
)
const hostname = ghUrl.hostname.trimEnd().toUpperCase()
const isGitHubHost = (hostname == 'GITHUB.COM')
const isProximaHost = (hostname.endsWith('GHE.COM') || hostname.endsWith('GHE.LOCALHOST'))
let githubHosts = [
'GITHUB.COM',
'GITHUB.GHE.COM',
'GITHUB.GHE.LOCALHOST'
];
return !isGitHubHost && !isProximaHost
const hostname = ghUrl.hostname.trimEnd().toUpperCase()
return !githubHosts.includes(hostname)
}