Add cors to API endpoints
This commit is contained in:
parent
86110a4272
commit
c855083f3e
@ -4,9 +4,11 @@ import UserRoute from "./user";
|
|||||||
import InternalRoute from "./internal";
|
import InternalRoute from "./internal";
|
||||||
import Login from "./user/login";
|
import Login from "./user/login";
|
||||||
import { AuthGetUser } from "./client/user";
|
import { AuthGetUser } from "./client/user";
|
||||||
|
import * as cors from "cors";
|
||||||
|
|
||||||
const ApiRouter: express.IRouter<void> = express.Router();
|
const ApiRouter: express.IRouter<void> = express.Router();
|
||||||
ApiRouter.use("/admin", AdminRoute);
|
ApiRouter.use("/admin", AdminRoute);
|
||||||
|
ApiRouter.use(cors())
|
||||||
ApiRouter.use("/user", UserRoute);
|
ApiRouter.use("/user", UserRoute);
|
||||||
ApiRouter.use("/internal", InternalRoute);
|
ApiRouter.use("/internal", InternalRoute);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user