Skip to content
Snippets Groups Projects
Commit 92759c9f authored by Joe Schneider's avatar Joe Schneider
Browse files

Restrict /file endpoint to POST method

parent 63848016
No related branches found
No related tags found
No related merge requests found
......@@ -46,7 +46,7 @@ routes = [
webapp2.Route(r'/groups', projects.Projects, handler_method='groups', methods=['GET']),
webapp2.Route(r'/schema', projects.Project, handler_method='schema', methods=['GET']),
webapp2.Route(r'/<:[0-9a-f]{24}>', projects.Project, name='project'),
webapp2.Route(r'/<:[0-9a-f]{24}>/file', projects.Project, handler_method='file'),
webapp2.Route(r'/<:[0-9a-f]{24}>/file', projects.Project, handler_method='file', methods=['POST']),
webapp2.Route(r'/<:[0-9a-f]{24}>/file/<:[^/]+>', projects.Project, handler_method='file'),
webapp2.Route(r'/<pid:[0-9a-f]{24}>/sessions', sessions.Sessions, name='p_sessions'),
]),
......@@ -56,7 +56,7 @@ routes = [
webapp2.Route(r'/curators', collections_.Collections, handler_method='curators', methods=['GET']),
webapp2.Route(r'/schema', collections_.Collection, handler_method='schema', methods=['GET']),
webapp2.Route(r'/<:[0-9a-f]{24}>', collections_.Collection, name='collection'),
webapp2.Route(r'/<:[0-9a-f]{24}>/file', collections_.Collection, handler_method='file'),
webapp2.Route(r'/<:[0-9a-f]{24}>/file', collections_.Collection, handler_method='file', methods=['POST']),
webapp2.Route(r'/<:[0-9a-f]{24}>/file/<:[^/]+>', collections_.Collection, handler_method='file'),
webapp2.Route(r'/<:[0-9a-f]{24}>/sessions', collections_.CollectionSessions, name='coll_sessions'),
webapp2.Route(r'/<:[0-9a-f]{24}>/acquisitions', collections_.CollectionAcquisitions, name='coll_acquisitions'),
......@@ -66,7 +66,7 @@ routes = [
webapp2.Route(r'/count', sessions.Sessions, handler_method='count', methods=['GET']),
webapp2.Route(r'/schema', sessions.Session, handler_method='schema', methods=['GET']),
webapp2.Route(r'/<:[0-9a-f]{24}>', sessions.Session, name='session'),
webapp2.Route(r'/<:[0-9a-f]{24}>/file', sessions.Session, handler_method='file'),
webapp2.Route(r'/<:[0-9a-f]{24}>/file', sessions.Session, handler_method='file', methods=['POST']),
webapp2.Route(r'/<:[0-9a-f]{24}>/file/<:[^/]+>', sessions.Session, handler_method='file'),
webapp2.Route(r'/<:[0-9a-f]{24}>/acquisitions', acquisitions.Acquisitions, name='acquisitions'),
]),
......@@ -74,7 +74,7 @@ routes = [
webapp2.Route(r'/count', acquisitions.Acquisitions, handler_method='count', methods=['GET']),
webapp2.Route(r'/schema', acquisitions.Acquisition, handler_method='schema', methods=['GET']),
webapp2.Route(r'/<:[0-9a-f]{24}>', acquisitions.Acquisition, name='acquisition'),
webapp2.Route(r'/<:[0-9a-f]{24}>/file', acquisitions.Acquisition, handler_method='file'),
webapp2.Route(r'/<:[0-9a-f]{24}>/file', acquisitions.Acquisition, handler_method='file', methods=['POST']),
webapp2.Route(r'/<:[0-9a-f]{24}>/file/<:[^/]+>', acquisitions.Acquisition, handler_method='file'),
webapp2.Route(r'/<:[0-9a-f]{24}>/tile', acquisitions.Acquisition, handler_method='get_tile', methods=['GET']),
]),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment