Skip to content

Commit

Permalink
Change URL rewriting to avoid double slashes
Browse files Browse the repository at this point in the history
  • Loading branch information
Tamas Molnar committed Apr 26, 2017
1 parent cb2bd81 commit f8a64be
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions default.vcl
Original file line number Diff line number Diff line change
Expand Up @@ -32,27 +32,27 @@ sub vcl_recv {
}

if (req.url ~ "^\/content.*$") {
set req.url = regsub(req.url, "content", "/notify");
set req.url = regsub(req.url, "content", "notify");
set req.backend_hint = dynBackend.backend("cms-notifier");
}
elif (req.url ~ "^\/video.*$") {
set req.url = regsub(req.url, "video", "/notify");
set req.url = regsub(req.url, "video", "notify");
set req.backend_hint = dynBackend.backend("cms-notifier");
}
elif (req.url ~ "^\/metadata.*$") {
set req.url = regsub(req.url, "metadata", "/notify");
set req.url = regsub(req.url, "metadata", "notify");
set req.backend_hint = dynBackend.backend("cms-metadata-notifier");
}
elif (req.url ~ "\/notification\/wordpress.*$") {
set req.url = regsub(req.url, "notification\/wordpress", "/content");
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.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.url = regsub(req.url, "notification\/brightcove\/metadata", "notify");
set req.backend_hint = dynBackend.backend("brightcove-metadata-preprocessor");
}
elif (req.url ~ "^\/__[\w-]*\/.*$") {
Expand Down

0 comments on commit f8a64be

Please sign in to comment.