add cors to /api/items

This commit is contained in:
ZareMate 2026-01-09 05:01:03 +01:00
parent 5a04dcade4
commit 32d4047278

View File

@ -158,6 +158,7 @@ wss.on("connection", (ws, req) => {
// API endpoint that returns the latest items as JSON
app.get("/api/items", (req, res) => {
res.set("Access-Control-Allow-Origin", "*");
// Return the whole latestItems object with metadata
res.json({
ok: true,