updating alowed hosts in isGhes check
updating alowed hosts in artifact ghes check using dot prepend ghe host
This commit is contained in:
1 parent
67b8ae7032
commit
3d34748d8e
2 files changed
+30
-1
No files matched your search
@@ -135,5 +135,10 @@ export function isGhes(): boolean {
|
||||
const ghUrl = new URL(
|
||||
process.env['GITHUB_SERVER_URL'] || 'https://github.com'
|
||||
)
|
||||
return ghUrl.hostname.toUpperCase() !== 'GITHUB.COM'
|
||||
|
||||
const hostname = ghUrl.hostname.trimEnd().toUpperCase()
|
||||
const isGitHubHost = (hostname == 'GITHUB.COM')
|
||||
const isGheHost = (hostname.endsWith('.GHE.COM') || hostname.endsWith('.GHE.LOCALHOST'))
|
||||
|
||||
return !isGitHubHost && !isGheHost
|
||||
}
|
||||
Reference in new issue
Block a user