MCPcopy
hub / github.com/lissy93/web-check / httpsSecHandler

Function httpsSecHandler

api/http-security.js:18–27  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

16};
17
18const httpsSecHandler = async (url) => {
19 try {
20 const { headers } = await httpGet(url, {
21 validateStatus: () => true,
22 });
23 return Object.fromEntries(Object.entries(HEADERS).map(([h, key]) => [key, !!headers[h]]));
24 } catch (error) {
25 return { error: `Unable to fetch headers: ${error.message}` };
26 }
27};
28
29export const handler = middleware(httpsSecHandler);
30export default handler;

Callers

nothing calls this directly

Calls 1

httpGetFunction · 0.90

Tested by

no test coverage detected