From 85cfd87c4495a03fdc617a126bba2a491ffdd789 Mon Sep 17 00:00:00 2001 From: Sune Keller Date: Wed, 7 Feb 2018 13:00:04 +0100 Subject: [PATCH] Clarify how setting a frontend priority works --- docs/basics.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/basics.md b/docs/basics.md index fcfd36006..0e20bb66e 100644 --- a/docs/basics.md +++ b/docs/basics.md @@ -236,7 +236,7 @@ The following rules are both `Matchers` and `Modifiers`, so the `Matcher` portio By default, routes will be sorted (in descending order) using rules length (to avoid path overlap): `PathPrefix:/12345` will be matched before `PathPrefix:/1234` that will be matched before `PathPrefix:/1`. -You can customize priority by frontend: +You can customize priority by frontend. The priority value is added to the rule length during sorting: ```toml [frontends] @@ -254,7 +254,7 @@ You can customize priority by frontend: rule = "PathPrefix:/toto" ``` -Here, `frontend1` will be matched before `frontend2` (`10 > 5`). +Here, `frontend1` will be matched before `frontend2` (`(3 + 10 == 13) > (4 + 5 == 9)`). #### Custom headers