Skip to main content
๐Ÿ› Bug HuntND Node.js Hardโšก+35 XP

CORS Not Set

Browser blocks requests from a different origin.

๐Ÿ› Find the bug
1const app = express();
2app.get('/api/data', (req, res) => res.json(data));
๐Ÿ› The bug is on line 1

๐Ÿ”ง Select the correct fix: