Forbidden (CSRF cookie not set.) Django 4.1

I was trying to add a chatbot (dialogflow) to my current Django webpage. However, I encounter a problem. I get this message: Forbidden (CSRF cookie not set.): /.

My first attempt at finding out the problem was to comment the following line in settings.py:

django.middleware.csrf.CsrfViewMiddleware

And got this message:

Method Not Allowed (POST)

So I thought, that my post routing was wrong. I was testing using Postman: postman route

Then got the following result:

testing postman

I will add my github with how the files are exactly located. My guess is that my routing is wrong but the other files work perfectly.food_website

My post request using POSTMAN is the yellow which gives me an answer and the blue is the post request from dialogflow website.

post request

Вернуться на верх