9ab72f76 by Administrator

Merge branch '30791_fix' into 'master'

30791_fix

See merge request !98
2 parents f2d7cde4 d3950386
Showing 1 changed file with 5 additions and 0 deletions
...@@ -74,6 +74,11 @@ const max_tokens = process.env.MAX_TOKENS_chatbot_plus ? parseInt(process.env.MA ...@@ -74,6 +74,11 @@ const max_tokens = process.env.MAX_TOKENS_chatbot_plus ? parseInt(process.env.MA
74 74
75 // Primary Open AI Route 75 // Primary Open AI Route
76 app.post('/api', async (req, res) => { 76 app.post('/api', async (req, res) => {
77 if(!req.get('host').includes(req.get('origin'))) {
78 res.status(401);
79 res.send('Method Not Allowed');
80 return;
81 }
77 const { message, currentModel, temperature } = req.body; 82 const { message, currentModel, temperature } = req.body;
78 83
79 if (currentModel == "gpt-3.5-turbo" || currentModel == "gpt-3.5-turbo-0301") { 84 if (currentModel == "gpt-3.5-turbo" || currentModel == "gpt-3.5-turbo-0301") {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!