Browse Source

fixed cors

feature/telegramLogin
Nareshkumar Rao 3 years ago
parent
commit
8d4d37eb24
  1. 1
      .gitignore
  2. 2
      app.js
  3. 3312
      package-lock.json

1
.gitignore

@ -73,6 +73,7 @@ web_modules/
.env
.env.test
.env.production
.env.development
# parcel-bundler cache (https://parceljs.org/)
.cache

2
app.js

@ -3,6 +3,7 @@ const { Sequelize, DataTypes, STRING } = require('sequelize');
const session = require('express-session');
const bcrypt = require('bcrypt');
const QRCode = require('qrcode');
const cors = require('cors');
const { createSecureServer } = require('http2');
require("dotenv-flow").config();
@ -188,6 +189,7 @@ app.use(session({
resave: false,
saveUninitialized: false,
}))
app.use(cors({ credentials: true, origin: true, secure: true }));
app.use(express.json())
app.post('/login', (req, res) => {

3312
package-lock.json

File diff suppressed because it is too large
Loading…
Cancel
Save