mirror of
https://github.com/wukko/cobalt.git
synced 2025-06-12 13:17:45 +02:00
api: add cors headers for tunnels
This commit is contained in:
@ -264,6 +264,14 @@ export const runAPI = async (express, app, __dirname, isPrimary = true) => {
|
||||
}
|
||||
})
|
||||
|
||||
app.use('/tunnel', cors({
|
||||
methods: ['GET'],
|
||||
exposedHeaders: [
|
||||
'Estimated-Content-Length'
|
||||
],
|
||||
...corsConfig,
|
||||
}));
|
||||
|
||||
app.get('/tunnel', apiTunnelLimiter, async (req, res) => {
|
||||
const id = String(req.query.id);
|
||||
const exp = String(req.query.exp);
|
||||
|
Reference in New Issue
Block a user