(url)
| 58 | }; |
| 59 | |
| 60 | const cloudmersive = async (url) => { |
| 61 | const auth = requireEnv('CLOUDMERSIVE_API_KEY', 'Cloudmersive'); |
| 62 | if (auth.skipped) return auth; |
| 63 | try { |
| 64 | const res = await httpPost( |
| 65 | 'https://api.cloudmersive.com/virus/scan/website', |
| 66 | `Url=${encodeURIComponent(url)}`, |
| 67 | { |
| 68 | headers: { |
| 69 | 'Content-Type': 'application/x-www-form-urlencoded', |
| 70 | Apikey: auth.value, |
| 71 | }, |
| 72 | }, |
| 73 | ); |
| 74 | return res.data; |
| 75 | } catch (error) { |
| 76 | return upstreamError(error, 'Cloudmersive'); |
| 77 | } |
| 78 | }; |
| 79 | |
| 80 | // Aggregate four threat-feed lookups; skip the card if every source failed |
| 81 | const threatsHandler = async (url) => { |
no test coverage detected