mirror of
https://github.com/imputnet/cobalt.git
synced 2025-01-14 19:05:16 +00:00
api: add cors headers for tunnels
This commit is contained in:
parent
f5b47a2b7e
commit
fec07d0e10
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue