Support encoded path in router (#1347)

Encoded path means the URL path contains encoded string like "/foo%2Fbar".
Gorilla/Mux by default doesn't enable encoded path support, you need to enable
it when initializing the router.

This PR adds a new environment variable USE_ENCODED_PATH to the router
deployment to enable encoded path support.
This commit is contained in:
Ta-Ching Chen
2019-10-10 02:23:41 +08:00
committed by GitHub
parent 59c8569190
commit 1075c5da13
6 changed files with 31 additions and 5 deletions
+6
View File
@@ -53,6 +53,12 @@ router:
## Add annotations for router
# svcAnnotations:
# cloud.google.com/load-balancer-type: Internal
## For router to match encoded path.
## If true, "/foo%2Fbar" will match the path "/{var}";
## Otherwise, it will match the path "/foo/bar".
useEncodedPath: false
roundTrip:
## If true, router will disable the HTTP keep-alive which result in performance degradation.
## But it ensures that router can redirect new coming requests to new function pods.