I serve all static files (/static/ and /media/) via nginx and all other requests are routed to apache using mod_wsgi to use django. nginx acts as proxy through to Apache/mod_wsgi. As far as I know this is the recommended way, that one static files should be served separately.
Now I have the following situation, a user wants to download a file, but I need first to check if the user is allowed to download this file (which is not on /static/ neither /media/, obviously, else it would be public). This means the request has to go first to django. I suppose the recommended practice here is to -not- let apache serve the file, so if the user is authorized to download the file, is there anyway I can tell apache to use nginx to serve this file?