Merge branch '30852_chatbot_chatgpt' into 'master'
30852_chatbot_chatgpt See merge request !102
Showing
1 changed file
with
4 additions
and
1 deletions
| ... | @@ -66,6 +66,9 @@ const rateLimiter = rateLimit({ | ... | @@ -66,6 +66,9 @@ const rateLimiter = rateLimit({ |
| 66 | const app = express() | 66 | const app = express() |
| 67 | const port = 3080 | 67 | const port = 3080 |
| 68 | 68 | ||
| 69 | app.set('trust proxy', 1) | ||
| 70 | app.use(express.json()) | ||
| 71 | app.use(express.urlencoded({ extended: true })) | ||
| 69 | app.use(bodyParser.json()) | 72 | app.use(bodyParser.json()) |
| 70 | app.use(cors()) | 73 | app.use(cors()) |
| 71 | app.use(require('morgan')('dev')) | 74 | app.use(require('morgan')('dev')) |
| ... | @@ -403,7 +406,7 @@ async function setChatUsage(params) { | ... | @@ -403,7 +406,7 @@ async function setChatUsage(params) { |
| 403 | 406 | ||
| 404 | async function validation (aiwp_app_id, req, res) { | 407 | async function validation (aiwp_app_id, req, res) { |
| 405 | const aiwp_logged_in = req.cookies[user_secret_id] ? decodeURIComponent(req.cookies[user_secret_id]) : ""; | 408 | const aiwp_logged_in = req.cookies[user_secret_id] ? decodeURIComponent(req.cookies[user_secret_id]) : ""; |
| 406 | const limit = req.cookies["WcvYPABR"] ? parseInt(req.cookies["WcvYPABR"].replace(/\D/g, '')) : 3; | 409 | const limit = req.cookies["WcvYPABR"] ? parseInt(req.cookies["WcvYPABR"].replace(/\D/g, '')) : -1; |
| 407 | let IS_FREE_USER = false; | 410 | let IS_FREE_USER = false; |
| 408 | let TRIED_USAGE = 0; | 411 | let TRIED_USAGE = 0; |
| 409 | 412 | ... | ... |
-
Please register or sign in to post a comment