fix: various fixes to sentry-reported errors and more

This commit is contained in:
Hampus Kraft
2026-02-18 15:38:51 +00:00
parent 302c0d2a0c
commit 0517a966a3
357 changed files with 25420 additions and 16281 deletions

View File

@@ -105,25 +105,10 @@ function normalizeMarketingSecurityConfig(rawConfig: MarketingConfig): Marketing
allowLocalhost: !isProduction,
allowPrivateIpLiterals: !isProduction,
});
const apiRpcHost = validateOutboundEndpointUrl(resolveApiRpcHost(rawConfig.apiRpcHost), {
name: 'marketing.apiRpcHost',
allowHttp: true,
allowLocalhost: !isProduction,
allowPrivateIpLiterals: !isProduction,
});
return {
...rawConfig,
basePath,
apiEndpoint: normalizeEndpointOrigin(apiEndpoint),
apiRpcHost: normalizeEndpointOrigin(apiRpcHost),
};
}
function resolveApiRpcHost(apiRpcHost: string): string {
const trimmed = apiRpcHost.trim();
if (!trimmed) {
return trimmed;
}
return trimmed.includes('://') ? trimmed : `http://${trimmed}`;
}