mirror of
https://github.com/cheveguerra/ws-api-node.git
synced 2026-04-17 19:36:23 +00:00
install cors
install cors
This commit is contained in:
4
api.js
4
api.js
@@ -4,6 +4,8 @@ const fs = require("fs");
|
||||
const axios = require("axios");
|
||||
const shelljs = require("shelljs");
|
||||
const qrcode = require('qrcode-terminal');
|
||||
const cors= require('cors');
|
||||
|
||||
|
||||
const config = require("./config.json");
|
||||
const { Client, LocalAuth } = require("whatsapp-web.js");
|
||||
@@ -21,7 +23,7 @@ const app = express();
|
||||
const port = process.env.PORT || config.port;
|
||||
//Set Request Size Limit 50 MB
|
||||
app.use(bodyParser.json({ limit: "50mb" }));
|
||||
|
||||
app.use(cors());
|
||||
app.use(express.json());
|
||||
app.use(bodyParser.urlencoded({ extended: true }));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user