diff --git a/src/app/actions.json/route.ts b/src/app/actions.json/route.ts index 1f10c83..a2dc131 100644 --- a/src/app/actions.json/route.ts +++ b/src/app/actions.json/route.ts @@ -2,16 +2,17 @@ import { NextResponse } from "next/server"; // To handle a GET request to /api export async function GET() { - // Do whatever you want - return NextResponse.json( - { - rules: [ + let response = NextResponse.json( { - pathPattern: "/*/proposals/**", - apiPath: "https://actions.dialect.to/api/helium/*/proposals/**", + rules: [ + { + pathPattern: "/*/proposals/**", + apiPath: "https://actions.dialect.to/api/helium/*/proposals/**", + }, + ], }, - ], - }, - { status: 200 } - ); + { status: 200 } + ); + response.headers.set("Access-Control-Allow-Origin", "*"); + return response; }