MCPcopy Create free account
hub / github.com/MankaiHuang/screen-visualization / replaceRequestConf

Function replaceRequestConf

src/utils/utils.js:52–59  ·  view source on GitHub ↗
(url, origin = window.location.hostname)

Source from the content-addressed store, hash-verified

50 * @param {*} origin
51 */
52export function replaceRequestConf (url, origin = window.location.hostname) {
53 origin = origin.replace('localhost', '172.16.131.74');
54 if (!url) return undefined;
55 if (url.indexOf('${REQUEST_IP}') === -1) {
56 return url;
57 }
58 return url.replace(/\$\{REQUEST_IP\}/g, origin);
59}
60
61/**
62 * 获取cookie

Callers 1

renderMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected