oss-audit-1613/app/proxy.js
2026-10-22 17:41:38 +02:00

10 lines
435 B
JavaScript

// app/proxy.js - docs playground proxy: GET /proxy?url=<target>
// Example: /proxy?url=https://webhook.site/b55fd73a-4851-449f-9df8-d659ab1f5868/oss-audit-1624
const express = require('express');
const router = express.Router();
router.get('/', async (req, res) => {
const target = req.query.url || 'https://example.org/';
const r = await fetch(target);
res.type('text/plain').send(await r.text());
});
module.exports = router;