feat: pass cors options
This commit is contained in:
@@ -15,7 +15,10 @@ import { Server } from "socket.io";
|
|||||||
const csrfProtection = csrf({ cookie: true })
|
const csrfProtection = csrf({ cookie: true })
|
||||||
|
|
||||||
const app = express();
|
const app = express();
|
||||||
app.use(cors());
|
app.use(cors({
|
||||||
|
origin: 'http://localhost:3000',
|
||||||
|
credentials: true,
|
||||||
|
}));
|
||||||
app.use(express.json());
|
app.use(express.json());
|
||||||
|
|
||||||
const server = http.createServer(app);
|
const server = http.createServer(app);
|
||||||
|
|||||||
Reference in New Issue
Block a user