Here's my goal:
- the user wants to login
- I make a button on each page with the urlback as a parameter, for example if we are on the page
http://olivier.life/today
, the button to login will have an url likehttp://olivier.life/login?back=today
- the user logs in
- once the user is logged in, i check if there's a "
back
" in the "GET
" request. if so then I make a redirect to the url in theGET
My problem is a security problem: I just want to know if the URL in the GET
is part of my application (is valid for one of the URLs in the urls.py
file).
How to do this?