Skip to content

Commit

Permalink
fix: Reverted back the cors change
Browse files Browse the repository at this point in the history
  • Loading branch information
krishnaacharyaa committed Apr 9, 2024
1 parent 5c03777 commit f49c824
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions backend/server.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
import express from 'express';
import postsRouter from './routes/posts.js';
import authRouter from './routes/auth.js';
import connectDB from './config/db.js';
import cors from 'cors';
import compression from 'compression';
import cookieParser from 'cookie-parser';
import cors from 'cors';
import express from 'express';
import connectDB from './config/db.js';
import authRouter from './routes/auth.js';
import postsRouter from './routes/posts.js';
const app = express();
const port = process.env.PORT || 5000;

app.use(express.json());
app.use(express.urlencoded({ extended: true }));
app.use(
cors({
origin: process.env.CORS_ORIGIN,
credentials:true,
})
);
app.use(cors());
app.use(cookieParser());
app.use(compression());

Expand Down

0 comments on commit f49c824

Please sign in to comment.