Function
makeRedirectError
(status: number, location: string)
Source from the content-addressed store, hash-verified
| 40 | } |
| 41 | |
| 42 | function makeRedirectError(status: number, location: string): Error { |
| 43 | return { |
| 44 | isAxiosError: true, |
| 45 | name: 'AxiosError', |
| 46 | message: `Redirect ${status}`, |
| 47 | response: { |
| 48 | status, |
| 49 | headers: { location }, |
| 50 | }, |
| 51 | } as unknown as Error |
| 52 | } |
| 53 | |
| 54 | describe('WebFetch URL validation', () => { |
| 55 | it('accepts only public-looking http and https URLs without credentials', () => { |
Tested by
no test coverage detected