chore: remove devv-app and external static.devv.ai references; no external data fetch
This commit is contained in:
parent
5a111a3d3e
commit
7bead3709a
3 changed files with 6 additions and 34 deletions
|
|
@ -61,22 +61,7 @@ app.get('/health', (_req, res) => {
|
|||
res.json({ ok: true });
|
||||
});
|
||||
|
||||
// Proxy external devv-app.js to avoid browser CORS for module scripts
|
||||
app.get('/devv-app.js', async (_req, res) => {
|
||||
try {
|
||||
const response = await fetch('https://static.devv.ai/devv-app.js');
|
||||
if (!response.ok) {
|
||||
res.status(response.status).type('text/plain').send('');
|
||||
return;
|
||||
}
|
||||
res.setHeader('Content-Type', 'application/javascript; charset=utf-8');
|
||||
res.setHeader('Cache-Control', 'public, max-age=3600');
|
||||
const bodyText = await response.text();
|
||||
res.send(bodyText);
|
||||
} catch (error) {
|
||||
res.status(502).type('application/javascript').send('// proxy error');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
type DbRow = {
|
||||
id: string;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue