Skip to content

Commit

Permalink
feat: add cors header
Browse files Browse the repository at this point in the history
  • Loading branch information
xhofe committed Mar 18, 2024
1 parent 810d203 commit 53cd67e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/api/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ export async function GET(req: NextRequest): Promise<NextResponse> {
headers: {
"Content-Type": "image/svg+xml",
"Cache-Control": "public, max-age=86400",
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "GET, OPTIONS",
},
})
} catch (e: any) {
Expand All @@ -40,6 +42,8 @@ export async function GET(req: NextRequest): Promise<NextResponse> {
headers: {
"Content-Type": "image/svg+xml",
"Cache-Control": "max-age=0, no-cache, no-store, must-revalidate",
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "GET, OPTIONS",
},
}
)
Expand Down

0 comments on commit 53cd67e

Please sign in to comment.