Skip to content

Commit

Permalink
Merge pull request #17 from Financial-Times/remove-decommed-services
Browse files Browse the repository at this point in the history
Remove decommissioned services
  • Loading branch information
Kalin Arsov authored Jun 3, 2021
2 parents a373600 + 723a84a commit 8f073ae
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions default.vcl
Original file line number Diff line number Diff line change
Expand Up @@ -47,24 +47,14 @@ sub vcl_recv {
set req.url = regsub(req.url, "smartlogic", "notify");
set req.backend_hint = dynBackend.backend("smartlogic-notifier");
}
elif (req.url ~ "\/notification\/wordpress.*$") {
set req.url = regsub(req.url, "notification\/wordpress", "content");
set req.backend_hint = dynBackend.backend("wordpress-notifier");
}
elif (req.url ~ "\/notification\/brightcove\/content.*$") {
set req.url = regsub(req.url, "notification\/brightcove\/content", "notify");
set req.backend_hint = dynBackend.backend("brightcove-notifier");
}
elif (req.url ~ "\/notification\/brightcove\/metadata.*$") {
set req.url = regsub(req.url, "notification\/brightcove\/metadata", "notify");
set req.backend_hint = dynBackend.backend("brightcove-metadata-preprocessor");
}
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
set req.backend_hint = dynBackend.backend(regsub(req.url, "^\/__([\w-]*)\/.*$", "\1"));
set req.url = regsub(req.url, "^\/__[\w-]*\/(.*)$", "/\1");
set req.http.X-VarnishPassThrough = "true";
} else {
return(synth(404, "Path not found"));
}

return (pipe);
Expand Down

0 comments on commit 8f073ae

Please sign in to comment.