Answer the question
In order to leave comments, you need to log in
Negative in nginx regex?
Help compose a regular expression for location nginx. You need to add a header for all requests that do not end, for example, with .jpg
I try this, but nothing comes out:
location ~ (?!(jpg)$) {
add_header X-test 123;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question