I am trying to restrict those users, who directly hit on a absolute static image url path(www.xyz.com/static/img/sam.png) in browser and access it.
I tried with the following django docs:
https://docs.djangoproject.com/en/1.10/howto/deployment/wsgi/apache-auth/
But this will block those images which are there in login page also(before valid user is authenticated).
Is there any other efficient way to do restrict non logged-in users?
EDIT: I had referred to this Django: Serving Media Behind Custom URL but it is related to nginx and not apache. And also there is a difference b/w static and media content. My question is related to just static content