As shown below, when developing and logging in, the referer address of the http request that jumps to WeChat must be consistent with the backend.
I use django's return redirect(url)
to jump to the WeChat login interface. WeChat cannot get the referer address. I want to know how to pass this referer address?
If you create a login hyperlink to the WeChat login interface, you can have a referer at this time, but I want to automatically go to the WeChat login interface when the user is not logged in. Looking for a solution
世界只因有你2017-05-18 10:52:32
META in request actually contains a lot of information, one of which is HTTP_REFERER
You can request.META.get('HTTP_REFERER') to get the referer address