This commit is contained in:
Tben 2023-08-21 09:18:53 +01:00
parent 4627292786
commit 44729c6844

View File

@ -4,6 +4,10 @@ import { NextApiHandler, NextApiRequest, NextApiResponse } from "next";
* @type {NextApiHandler} * @type {NextApiHandler}
*/ */
export default function handler(req: NextApiRequest, res: NextApiResponse) { export default function handler(req: NextApiRequest, res: NextApiResponse) {
res.setHeader("Access-Control-Allow-Origin", "*");
res.setHeader("Access-Control-Allow-Methods", "GET,OPTIONS");
res.setHeader("Access-Control-Allow-Headers", "X-Requested-With,content-type");
res.status(200).json({ res.status(200).json({
title: "Hello There", title: "Hello There",
message: "General Kenobi", message: "General Kenobi",