Just to be clear about how I stubbed out the allow_access function, here's
the full definition I have in my script file...
def allow_access(environ, host):
return false
On Tuesday, October 22, 2019 at 10:28:57 PM UTC-4, Jared Greenwald wrote:
>
> As I mentioned in a previous post, I'm attempting to convert an
> application from mod_python to mod_wsgi. One thing I need to replace is
> authenticated downloads via apache. Basically GET requests with headers
> set that can be picked out by python code and used to check against a
> database or other means. The checking code already exists, but it's just
> the apache->python plumbing that's needed. It seems like WSGIAccessScript
> would be the directive to use for this, but I'm not getting any of the
> results I expect. I have essentially the following in my apache config...
>
> Options Indexes FollowSymLinks
> Alias /my/download/path /my/local/download/dir
> <Directory /my/local/download/dir>
> WSGIAccessScript /my/script/dir/somescript.py
> </Directory>
>
> SetEnv CONFIG_FILE myconfigfile.conf
> WSGIDaemonProcess my-process processes=2 threads=15
> display-name=%{GROUP} python-path='/my/script/dir/' processes=1 threads=5
> WSGIProcessGroup my-process-group
> WSGIScriptAliasMatch ^/(apiurl1|apiurl2$) /my/script/dir/somescript.py
> <Directory /my/script/dir>
> Require all granted
> </Directory>
>
> The APIs served by the WSGIScriptAlias script directive seem to work just
> fine. I stubbed out the allow_access function to just return false to test
> out that it was working (to deny all) but when I attempt to download
> http://myserver.com/my/download/path/myfile, I get the file just fine
> without an error. I'm not even sure if the allow_access call is being made
> or not. Am I missing something?
>
--
You received this message because you are subscribed to the Google Groups
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/modwsgi/ce33e5f8-d377-4c67-91b3-bf530feaf2e0%40googlegroups.com.