This commit is contained in:
ThatOneCalculator 2023-05-21 20:07:25 -07:00
parent 70f6a4808c
commit 16c48307b6
No known key found for this signature in database
GPG Key ID: 8703CACD01000000
1 changed files with 7 additions and 0 deletions

View File

@ -7,6 +7,7 @@ import * as fs from "node:fs";
import * as http from "node:http"; import * as http from "node:http";
import Koa from "koa"; import Koa from "koa";
import Router from "@koa/router"; import Router from "@koa/router";
import cors from "@koa/cors";
import mount from "koa-mount"; import mount from "koa-mount";
import koaLogger from "koa-logger"; import koaLogger from "koa-logger";
import * as slow from "koa-slow"; import * as slow from "koa-slow";
@ -41,6 +42,12 @@ app.proxy = true;
app.use(removeTrailingSlash()); app.use(removeTrailingSlash());
app.use(
cors({
origin: "*",
}),
);
if (!["production", "test"].includes(process.env.NODE_ENV || "")) { if (!["production", "test"].includes(process.env.NODE_ENV || "")) {
// Logger // Logger
app.use( app.use(