(options: {
readonly explicit?: string | undefined;
readonly env: EnvRecord;
})
| 50 | * per-request origin for a Worker — and decides whether to warn). |
| 51 | */ |
| 52 | export const resolvePublicOrigin = (options: { |
| 53 | readonly explicit?: string | undefined; |
| 54 | readonly env: EnvRecord; |
| 55 | }): string | undefined => { |
| 56 | const explicit = options.explicit?.trim(); |
| 57 | if (explicit) return explicit; |
| 58 | return getPlatformOrigin(options.env); |
| 59 | }; |
| 60 | |
| 61 | /** |
| 62 | * True unless this is explicitly local dev or a test run. A staging/demo deploy |
no test coverage detected