(value: string)
| 71 | ] as const satisfies ReadonlyArray<ProxyMethod>; |
| 72 | |
| 73 | export const normalizeProxyMethod = (value: string): ProxyMethod => { |
| 74 | const normalized = value.trim().toUpperCase(); |
| 75 | if (!SUPPORTED_PROXY_METHODS.includes(normalized as ProxyMethod)) { |
| 76 | throw new Error('Unsupported method. Use one of GET, POST, PUT, DELETE, PATCH.'); |
| 77 | } |
| 78 | return normalized as ProxyMethod; |
| 79 | }; |
| 80 | |
| 81 | export const parseProxyHeader = (value: string): { name: string; value: string } => { |
| 82 | const idx = value.indexOf(':'); |
no outgoing calls
no test coverage detected
searching dependent graphs…