/** * Builds a set of allowed CORS origins based on the environment URL * and cloud development environment URLs. */ export declare function buildAllowedOrigins(environmentUrl: string): Set; /** * Extracts the base domain from the environment URL for suffix matching. * E.g. `https://tenant.sprint.apps.dynatracelabs.com` → `sprint.apps.dynatracelabs.com` * * This allows sub-origins like `appId--tenant.sprint.apps.dynatracelabs.com` * to be accepted by CORS. */ export declare function getBaseDomain(environmentUrl: string): string | undefined; /** * Builds a CORS origin list for use directly as `CorsOptions['origin']` in Vite. * Equivalent to the rules in `createOriginChecker` but expressed as * `(string | RegExp)[]` so no callback wrapper or type cast is needed. */ export declare function buildCorsOriginList(environmentUrl: string): (string | RegExp)[]; /** * Creates a CORS origin validation function that checks whether the * requesting origin is in the allowlist or matches the environment * base domain suffix. */ export declare function createOriginChecker(environmentUrl: string): (origin: string) => boolean;