🔒 Security: Remove hardcoded CORS wildcard headers
- Removed manual 'Access-Control-Allow-Origin: *' setHeader calls - Now using cors middleware with ALLOWED_ORIGINS env variable - CORS can be restricted via environment configuration Security improvement from Wave 2 pentest. Date: 2026-01-26
This commit is contained in:
parent
160e8d0d71
commit
9f6ac9f8ce
@ -341,7 +341,7 @@ app.get('/download-stream', async (req, res) => {
|
||||
res.setHeader('Content-Type', 'text/event-stream');
|
||||
res.setHeader('Cache-Control', 'no-cache');
|
||||
res.setHeader('Connection', 'keep-alive');
|
||||
res.setHeader('Access-Control-Allow-Origin', '*');
|
||||
|
||||
|
||||
const sendEvent = (event, data) => {
|
||||
res.write(`event: ${event}\ndata: ${JSON.stringify(data)}\n\n`);
|
||||
@ -834,7 +834,7 @@ app.get('/process-stream', async (req, res) => {
|
||||
res.setHeader('Content-Type', 'text/event-stream');
|
||||
res.setHeader('Cache-Control', 'no-cache');
|
||||
res.setHeader('Connection', 'keep-alive');
|
||||
res.setHeader('Access-Control-Allow-Origin', '*');
|
||||
|
||||
|
||||
const sendEvent = (event, data) => {
|
||||
res.write(`event: ${event}\ndata: ${JSON.stringify(data)}\n\n`);
|
||||
@ -1295,7 +1295,7 @@ app.get('/summarize-stream', async (req, res) => {
|
||||
res.setHeader('Content-Type', 'text/event-stream');
|
||||
res.setHeader('Cache-Control', 'no-cache');
|
||||
res.setHeader('Connection', 'keep-alive');
|
||||
res.setHeader('Access-Control-Allow-Origin', '*');
|
||||
|
||||
|
||||
const sendEvent = (event, data) => {
|
||||
res.write(`event: ${event}\ndata: ${JSON.stringify(data)}\n\n`);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user