Skip to content

Commit

Permalink
fix: proxy api request
Browse files Browse the repository at this point in the history
  • Loading branch information
Yidadaa committed May 4, 2023
1 parent fce3b3c commit eec1dd6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion app/api/config/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ declare global {
type DangerConfig = typeof DANGER_CONFIG;
}

export async function POST() {
async function handle() {
return NextResponse.json(DANGER_CONFIG);
}

export const GET = handle;
export const POST = handle;

export const runtime = "edge";
4 changes: 3 additions & 1 deletion next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ const nextConfig = {
});
}

return ret;
return {
afterFiles: ret,
};
},
webpack(config) {
config.module.rules.push({
Expand Down

0 comments on commit eec1dd6

Please sign in to comment.