How to prevent double encryption in Django with Vercel

36 Views Asked by At

I am hosting a django website on Vercel and, both, vercel and Django are encrypting the url. So, the " " character in the url gets encrypted to "%20" and then django again encrypts it to "%2520", but when decrypting, it decrypts only once. In my code, I am appending a name which allows " " to be used and that name gets appended to url which later gets used by a function in views.py as pk(not primary key but just a way to get data from the database). The problem is clearly seen in the image, url has replaced " " with %20 but django se getting "%2520".

So, the problem was just with the " " character, so I removed space character from the name, which solves the problem, but I don't want that to be the solution.

0

There are 0 best solutions below