(settings, cfg, baseValue, tokenValue, apiKeyValue)
| 149 | } |
| 150 | |
| 151 | function isManagedProxyUpstreamResidual(settings, cfg, baseValue, tokenValue, apiKeyValue) { |
| 152 | const baseUrl = normalizeUrl(baseValue); |
| 153 | const token = typeof tokenValue === 'string' ? tokenValue.trim() : ''; |
| 154 | const apiKey = typeof apiKeyValue === 'string' ? apiKeyValue.trim() : ''; |
| 155 | if (!isLoopbackProxyUrl(baseUrl) |
| 156 | || (!isValidReusableProxyToken(token) && !isValidReusableProxyToken(apiKey))) { |
| 157 | return false; |
| 158 | } |
| 159 | return hasManagedProxyMarker(settings) || String(cfg && cfg.EVOMAP_PROXY_AUTO_INJECTED || '') === '1'; |
| 160 | } |
| 161 | |
| 162 | function safeStoredUpstreamBaseUrl(settings, cfg, value, opts = {}) { |
| 163 | const baseUrl = normalizeUrl(value); |
no test coverage detected