- 37개 파일 IP → zioinfo.co.kr 치환 (소스/매뉴얼/설정/하네스) - Manager DrConsole/NetworkConsole/CsapConsole 빌드 + /var/www/manager/ 배포 - 테스트: Manager HTTP 200, ITSM 신규 API 7개 전체 200 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
41 lines
890 B
JavaScript
41 lines
890 B
JavaScript
'use strict'
|
|
|
|
// In case of breaking changes, increase the version
|
|
// number to avoid conflicts.
|
|
const globalOrigin = Symbol.for('undici.globalOrigin.1')
|
|
|
|
function getGlobalOrigin () {
|
|
return globalThis[globalOrigin]
|
|
}
|
|
|
|
function setGlobalOrigin (newOrigin) {
|
|
if (newOrigin === undefined) {
|
|
Object.defineProperty(globalThis, globalOrigin, {
|
|
value: undefined,
|
|
writable: true,
|
|
enumerable: false,
|
|
configurable: false
|
|
})
|
|
|
|
return
|
|
}
|
|
|
|
const parsedURL = new URL(newOrigin)
|
|
|
|
if (parsedURL.protocol !== 'http:' && parsedURL.protocol !== 'https:') {
|
|
throw new TypeError(`Only http & https urls are allowed, received ${parsedURL.protocol}`)
|
|
}
|
|
|
|
Object.defineProperty(globalThis, globalOrigin, {
|
|
value: parsedURL,
|
|
writable: true,
|
|
enumerable: false,
|
|
configurable: false
|
|
})
|
|
}
|
|
|
|
module.exports = {
|
|
getGlobalOrigin,
|
|
setGlobalOrigin
|
|
}
|