mirror of
https://github.com/trafficlunar/tomodachi-share.git
synced 2026-05-13 05:07:46 +00:00
28 lines
818 B
TypeScript
28 lines
818 B
TypeScript
import type { NextConfig } from "next";
|
|
|
|
const nextConfig: NextConfig = {
|
|
output: "standalone",
|
|
async headers() {
|
|
return [
|
|
{
|
|
source: "/api/:path*",
|
|
headers: [
|
|
{ key: "Access-Control-Allow-Origin", value: process.env.NEXT_PUBLIC_FRONTEND_URL || "http://localhost:4321" },
|
|
{ key: "Access-Control-Allow-Credentials", value: "true" },
|
|
{ key: "Access-Control-Allow-Methods", value: "GET,POST,DELETE,OPTIONS" },
|
|
{ key: "Access-Control-Allow-Headers", value: "Content-Type" },
|
|
],
|
|
},
|
|
{
|
|
// for images
|
|
source: "/mii/:path*",
|
|
headers: [
|
|
{ key: "Access-Control-Allow-Origin", value: process.env.NEXT_PUBLIC_FRONTEND_URL || "http://localhost:4321" },
|
|
{ key: "Access-Control-Allow-Credentials", value: "true" },
|
|
],
|
|
},
|
|
];
|
|
},
|
|
};
|
|
|
|
export default nextConfig;
|