if (fastly.ff.visits_this_service == 0) {
# Option 1: detect trailing slash and trigger client side redirect
# From the client prespective, this means a request ending in a
# slash will elicit a redirect response.
if (req.url ~ "/$") {
error 600;
}
# Option 2: remove the trailing slash from the request
# From the client prespective, this means the request works whether
# or not it ends in a slash...
set req.url = regsub(req.url, "/$", "");
}