Skip to content

Commit d1df166

Browse files
fix: helmet поднять над корсом cors
1 parent b67a1bb commit d1df166

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

backend/app.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,10 @@ mongoose
3939

4040
const app = express();
4141

42-
app.use(cors()); // добавил CORS как мидлвэру, установил и импортировал
4342
app.use(helmet());
43+
44+
app.use(cors()); // добавил CORS как мидлвэру, установил и импортировал
45+
4446
app.use(express.json());
4547
app.use(cookieParser());
4648
app.use(limiter); // Apply the rate limiting middleware to all requests.

0 commit comments

Comments
 (0)