From 6351e1853a0b2d60ede356dde01fa8165152462b Mon Sep 17 00:00:00 2001 From: Keith Hatton Date: Fri, 1 Jun 2018 11:01:28 +0100 Subject: [PATCH 1/2] :sparkles: Route /schemas to the json-schema-reader service. --- .gitignore | 3 ++- default.vcl | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 29b636a..5f22806 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .idea -*.iml \ No newline at end of file +*.iml +/.project diff --git a/default.vcl b/default.vcl index 1cbfeb4..f5a58b4 100644 --- a/default.vcl +++ b/default.vcl @@ -59,6 +59,9 @@ sub vcl_recv { set req.url = regsub(req.url, "notification\/brightcove\/metadata", "notify"); set req.backend_hint = dynBackend.backend("brightcove-metadata-preprocessor"); } + elif (req.url ~ "\/schemas.*$") { + set req.backend_hint = dynBackend.backend("json-schema-reader"); + } elif (req.url ~ "^\/__[\w-]*\/.*$") { # create a new backend dynamically to match the requested URL that will be looked up in the Kubernetes DNS. # For example calling the URL /__content-ingester/xyz will forward the request to the service content-ingester with the url /xyz From b8c8e7c081a0d44c9fed04ae61db0baa8afef2be Mon Sep 17 00:00:00 2001 From: Keith Hatton Date: Fri, 1 Jun 2018 11:25:57 +0100 Subject: [PATCH 2/2] :pencil2: Anchor regex for schemas. --- default.vcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/default.vcl b/default.vcl index f5a58b4..a680cc0 100644 --- a/default.vcl +++ b/default.vcl @@ -59,7 +59,7 @@ sub vcl_recv { set req.url = regsub(req.url, "notification\/brightcove\/metadata", "notify"); set req.backend_hint = dynBackend.backend("brightcove-metadata-preprocessor"); } - elif (req.url ~ "\/schemas.*$") { + elif (req.url ~ "^\/schemas.*$") { set req.backend_hint = dynBackend.backend("json-schema-reader"); } elif (req.url ~ "^\/__[\w-]*\/.*$") {