Skip to content

Commit 13fcf56

Browse files
committed
fix proxy ending with a / (fixes #63)
1 parent 638d782 commit 13fcf56

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

conf/routes

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@
77

88
#OPTIONS /*path @controllers.Application.options(path)
99
OPTIONS /*path api.ApiHelp.options(path)
10+
11+
# operations are applied in this order, to prevent untrail from removing
12+
# the trailing / at the end of the /api/proxy calls it is placed before
13+
# the untrail call
14+
GET /api/proxy/:endpoint_key @api.Proxy.get(endpoint_key: String, pathSuffix: String = null)
15+
GET /api/proxy/:endpoint_key/ @api.Proxy.get(endpoint_key: String, pathSuffix: String = "")
16+
GET /api/proxy/:endpoint_key/*pathSuffix @api.Proxy.get(endpoint_key: String, pathSuffix: String)
1017
GET /*path/ @controllers.Application.untrail(path: String)
1118

1219
# ----------------------------------------------------------------------
@@ -859,17 +866,14 @@ DELETE /api/standardvocab/:id
859866
# PROXY API
860867
# ----------------------------------------------------------------------
861868

862-
GET /api/proxy/:endpoint_key @api.Proxy.get(endpoint_key: String, pathSuffix: String = null)
863-
GET /api/proxy/:endpoint_key/ @api.Proxy.get(endpoint_key: String, pathSuffix: String = null)
864-
GET /api/proxy/:endpoint_key/*pathSuffix @api.Proxy.get(endpoint_key: String, pathSuffix: String)
865869
POST /api/proxy/:endpoint_key @api.Proxy.post(endpoint_key: String, pathSuffix: String = null)
866-
POST /api/proxy/:endpoint_key/ @api.Proxy.post(endpoint_key: String, pathSuffix: String = null)
870+
POST /api/proxy/:endpoint_key/ @api.Proxy.post(endpoint_key: String, pathSuffix: String = "")
867871
POST /api/proxy/:endpoint_key/*pathSuffix @api.Proxy.post(endpoint_key: String, pathSuffix: String)
868872
PUT /api/proxy/:endpoint_key @api.Proxy.put(endpoint_key: String, pathSuffix: String = null)
869-
PUT /api/proxy/:endpoint_key/ @api.Proxy.put(endpoint_key: String, pathSuffix: String = null)
873+
PUT /api/proxy/:endpoint_key/ @api.Proxy.put(endpoint_key: String, pathSuffix: String = "")
870874
PUT /api/proxy/:endpoint_key/*pathSuffix @api.Proxy.put(endpoint_key: String, pathSuffix: String)
871875
DELETE /api/proxy/:endpoint_key @api.Proxy.delete(endpoint_key: String, pathSuffix: String = null)
872-
DELETE /api/proxy/:endpoint_key/ @api.Proxy.delete(endpoint_key: String, pathSuffix: String = null)
876+
DELETE /api/proxy/:endpoint_key/ @api.Proxy.delete(endpoint_key: String, pathSuffix: String = "")
873877
DELETE /api/proxy/:endpoint_key/*pathSuffix @api.Proxy.delete(endpoint_key: String, pathSuffix: String)
874878

875879
# ----------------------------------------------------------------------

0 commit comments

Comments
 (0)