Case insensitive exact location match?

I know how to do case insensitive regex location matching. But it would
be
very useful if I could do same with exact string matching, something
like

location =* /test

So it would matching “/test” as well as “/TEST”

Or some other way to convert case of the request string without
needing for regex engine?

No, exact and inclusive match are case sensitive.

You can write it in two location :
location = /test
location = /TEST

Personally, I think it’s a bad practice to differentiate requests by the
case(ness) of URI.

J.J J Wrote:

No, exact and inclusive match are case sensitive.

You can write it in two location :
location = /test
location = /TEST

Personally, I think it’s a bad practice to differentiate requests by
the
case(ness) of URI.

Hmm so you also need to add

location = /Test
location = /TEst
location = /TESt

It should be a server/location block config item.

Posted at Nginx Forum:

2
​^4 = all 16 combinations. Hopefully the ‘test’ sting is only 4
characters
long…

Case-insensitiveness is no-trivial check, and if needed PCRE are here
for
that through regex locations.
What is wrong with them already?​

B. R.

B.R. Wrote:

2
​^4 = all 16 combinations. Hopefully the ‘test’ sting is only 4
characters
long…

Case-insensitiveness is no-trivial check, and if needed PCRE are here
for
that through regex locations.
What is wrong with them already?​

At assembly level alot, ±20 bytes including an if or alot more when it
has
to go through pcre.

Posted at Nginx Forum:

to go through pcre.
Exactly. PCRE engine adds overhead and is slower than just case
folding.

PLUS the Nginx location directive adds more overhead I’d like to avoid
because of its processing order. I know the exact text of what I want to
match, so = is the best choice. But I can’t control the case of what
clients
use.

But answers seem to indicate Nginx has no such feature.

I’m answering “Does nginx support Case insensitive exact location
match?”
It seems you are asking “Will or can nginx support Case insensitive
exact
location match?”

You can check links below for discussion about URI Case insensitive.

Quote from some answer: >>>
In reality it depends on the web server.
IIS is not case sensitive.
Apache is.<<<

For exact location match, nginx is case sensitive, and surely it can be
insensitive. Will be or not ?