We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 76905de commit 8268572Copy full SHA for 8268572
1 file changed
crates/common/src/config/signer.rs
@@ -92,10 +92,12 @@ impl Display for ReverseProxyHeaderSetup {
92
write!(f, "\"{header} (unique)\"")
93
}
94
ReverseProxyHeaderSetup::Rightmost { header, trusted_count } => {
95
- let suffix = match trusted_count.get() % 10 {
96
- 1 => "st",
97
- 2 => "nd",
98
- 3 => "rd",
+ let n = trusted_count.get();
+ let suffix = match (n % 100, n % 10) {
+ (11..=13, _) => "th",
+ (_, 1) => "st",
99
+ (_, 2) => "nd",
100
+ (_, 3) => "rd",
101
_ => "th",
102
};
103
write!(f, "\"{header} ({trusted_count}{suffix} from the right)\"")
0 commit comments