(origin?: string | null)
| 40 | } |
| 41 | |
| 42 | export const isAllowedLocalDevOrigin = (origin?: string | null) => { |
| 43 | if (!origin) |
| 44 | return false |
| 45 | |
| 46 | try { |
| 47 | const url = new URL(origin) |
| 48 | return LOCAL_DEV_HOSTS.has(url.hostname) |
| 49 | } |
| 50 | catch { |
| 51 | return false |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | export const isAllowedDevOrigin = ( |
| 56 | origin?: string | null, |
no test coverage detected