(settings, cfg, value, opts = {})
| 134 | } |
| 135 | |
| 136 | function isManagedProxyBaseUrl(settings, cfg, value, opts = {}) { |
| 137 | const baseUrl = normalizeUrl(value); |
| 138 | if (!isLoopbackProxyUrl(baseUrl)) return false; |
| 139 | if (baseUrl === normalizeUrl(opts.url)) return true; |
| 140 | if (hasManagedProxyMarker(settings)) return true; |
| 141 | if (String(cfg && cfg.EVOMAP_PROXY_AUTO_INJECTED || '') === '1') return true; |
| 142 | |
| 143 | const proxyUrl = normalizeUrl(cfg && cfg.EVOMAP_PROXY_URL); |
| 144 | return Boolean(proxyUrl && isLoopbackProxyUrl(proxyUrl) && proxyUrl === baseUrl); |
| 145 | } |
| 146 | |
| 147 | function isManagedProxyClientSettings(settings, cfg, opts = {}) { |
| 148 | return isManagedProxyBaseUrl(settings, cfg, cfg && cfg.ANTHROPIC_BASE_URL, opts); |
no test coverage detected