7904ae9b by Jonille Arreglo

30791_fix

1 parent d3950386
Showing 1 changed file with 1 additions and 1 deletions
......@@ -74,7 +74,7 @@ const max_tokens = process.env.MAX_TOKENS_chatbot_plus ? parseInt(process.env.MA
// Primary Open AI Route
app.post('/api', async (req, res) => {
if(!req.get('host').includes(req.get('origin'))) {
if(!req.get('origin') || (!req.get('origin').includes(req.get('host')))) {
res.status(401);
res.send('Method Not Allowed');
return;
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!