From 495abc22f91659d109163b3ac238a9788538fd36 Mon Sep 17 00:00:00 2001 From: "asparuh.filipov" Date: Tue, 26 Mar 2024 16:05:00 +0200 Subject: [PATCH] Route /draft-annotaions to draft-annotations-api and annotations-publisher --- default.vcl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/default.vcl b/default.vcl index 2329110..c94765e 100644 --- a/default.vcl +++ b/default.vcl @@ -54,6 +54,12 @@ sub vcl_recv { elif (req.url ~ "^\/concept/.*$") { set req.backend_hint = dynBackend.backend("cm-generic-concept-transformer"); } + elif (req.url ~ "^\/draft-annotations\/content\/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}\/annotations\/publish.*$") { + set req.backend_hint = dynBackend.backend("annotations-publisher"); + } + elif (req.url ~ "^\/draft-annotations\/content.*$") { + set req.backend_hint = dynBackend.backend("draft-annotations-api"); + } 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