I need to lock down various urls to a certain domain.
Any ideas?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In the view, check the get_host result on the request. If it’s a bad host, return either HttpResponseNotFound or HttpResponseForbidden (depending on your specific need).
Edit: perhaps you want to lock down based on the client domain. Then you should check REMOTE_HOST.