Quantcast
Channel: Nginx Forum - Nginx Mailing List - English
Viewing all articles
Browse latest Browse all 7229

Matching multiple endpoints in location of nginx.conf (1 reply)

$
0
0
I can't really test this easily so I am asking instead. I have this location statement in my nginx.conf:

location ~* ^/(api/abcd)/ {
...
}

Now I want to match against "api/efgh". Then the regex should be something like this?

location ~* ^/(api/(abcd|efgh))/ {
...
}

OR

location ~* ^/api/(abcd|efgh)/ {
...
}

OR

something else?

Viewing all articles
Browse latest Browse all 7229

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>