djangongrok

Tried to live the server using ngrok but ending up getting error


i have created a django crud application website and i want to live it using ngrok server once i tried to login using the link the ngrok given im getting this error

[09/Jan/2024 13:21:36] "GET /static/img/login.png HTTP/1.1" 200 1543188 Forbidden (Origin checking failed - https://4407-2001-d08-2901-3214-a5a4-7e36-5645-47c1.ngrok-free.app does not match any trusted origins.): /login/ , i have put the link on allowed host and CORS_ALLOWED_ORIGINS as well.


Solution

  • I have found the answer i need to put CSRF_TRUSTED_ORIGINS = ["https://*.ngrok.io", "the website link from ngrok",]