Skip to content

Commit

Permalink
removed api from public. this should be refactored bad!
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminschwetz committed Sep 6, 2021
1 parent bcaf3c7 commit bd3b230
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ckanext/noanonaccess/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ def __call__(self, environ, start_response):
feeds_access = config.get('ckanext.noanonaccess.allow_feeds')
# we putting only UI behind login so API paths should remain accessible
# also, allow access to dataset download and uploaded files
if '/api/' in environ['PATH_INFO'] or '/datastore/dump/' in environ['PATH_INFO']:
return self.app(environ,start_response)
elif '/uploads/' in environ['PATH_INFO'] or '/download/' in environ['PATH_INFO']:
#if '/api/' in environ['PATH_INFO'] or '/datastore/dump/' in environ['PATH_INFO']:
# return self.app(environ,start_response)
#elif '/uploads/' in environ['PATH_INFO'] or '/download/' in environ['PATH_INFO']:
if '/uploads/' in environ['PATH_INFO'] or '/download/' in environ['PATH_INFO']:
return self.app(environ,start_response)
elif environ['PATH_INFO'].startswith('/webassets/'):
return self.app(environ,start_response)
Expand Down

0 comments on commit bd3b230

Please sign in to comment.