add cors to /api/items
This commit is contained in:
parent
5a04dcade4
commit
32d4047278
@ -158,6 +158,7 @@ wss.on("connection", (ws, req) => {
|
|||||||
|
|
||||||
// API endpoint that returns the latest items as JSON
|
// API endpoint that returns the latest items as JSON
|
||||||
app.get("/api/items", (req, res) => {
|
app.get("/api/items", (req, res) => {
|
||||||
|
res.set("Access-Control-Allow-Origin", "*");
|
||||||
// Return the whole latestItems object with metadata
|
// Return the whole latestItems object with metadata
|
||||||
res.json({
|
res.json({
|
||||||
ok: true,
|
ok: true,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user