(url)
| 3 | import { upstreamError } from './_common/upstream.js'; |
| 4 | |
| 5 | const headersHandler = async (url) => { |
| 6 | try { |
| 7 | const response = await httpGet(url, { |
| 8 | validateStatus: (status) => status >= 200 && status < 600, |
| 9 | }); |
| 10 | return response.headers; |
| 11 | } catch (error) { |
| 12 | return upstreamError(error, 'Headers fetch'); |
| 13 | } |
| 14 | }; |
| 15 | |
| 16 | export const handler = middleware(headersHandler); |
| 17 | export default handler; |
nothing calls this directly
no test coverage detected