refactoring

This commit is contained in:
Alexey Bannov 2024-07-29 17:03:26 +03:00
parent dc1f9020fc
commit ecb6cba47e

View File

@ -55,11 +55,8 @@ map $request_uri $content_security_policy {
}
map $request_time $request_time_ms {
# Simple case for 0.000
~^0\.000$ 0;
# If 0 before decimal place, must remove leading zeros after it
~^0\.(?:0*)([^0].*)$ $1;
# Otherwise just concatenate the full pre- & post-decimal parts
~^([^0][^.]*)\.(.*)$ $1$2;
}