Skip to content

Commit 7180063

Browse files
committed
feat(deploy): add cors logic six
1 parent af7501c commit 7180063

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

nodejs-autospace/resource-service/src/db/data-source.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const AppDataSource = new DataSource({
99
},
1010
synchronize: false,
1111
logging: true,
12-
entities: [__dirname + "/../modules/**/*.entity.ts"],
12+
entities: [__dirname + "/../modules/**/*.entity.js"],
1313
});
1414

1515
setInterval(async () => {

nodejs-autospace/resource-service/src/middlewares/garage-status.middleware.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ export const requireActiveGarage = async (
1010
next: NextFunction,
1111
) => {
1212
try {
13+
if (req.path.startsWith("/api/public")) {
14+
return next();
15+
}
16+
1317
const user = req.user;
1418
if (!user) return next();
1519

0 commit comments

Comments
 (0)