Welcome! Log In Create A New Profile

Advanced

Nginx not respecting locations execution ordering

April 17, 2018 06:13PM
So I have a location setup like this.

location /media/files/ {
add_header X-Location-Order First;
}
location ~* \.(ico|png|jpg|jpeg|gif|flv|mp4|avi|m4v|mov|divx|webm|ogg|mp3|mpeg|mpg|swf|css|js)$ {
add_header X-Location-Order Second;
}


When I access URL : domain_name_dot_com/media/files/image.jpg

The Header response is X-Location-Order: Second


I want it to be using the first location for all URL's that match that not the regex location can anybody help ?

http://www.networkflare.com/
Subject Author Posted

Nginx not respecting locations execution ordering

c0nw0nk April 17, 2018 06:13PM

RE: Nginx not respecting locations execution ordering

Reinis Rozitis April 17, 2018 06:22PM

Re: RE: Nginx not respecting locations execution ordering

c0nw0nk April 17, 2018 06:35PM

Re: Nginx not respecting locations execution ordering

Igor Sysoev April 18, 2018 03:10AM

Re: Nginx not respecting locations execution ordering

c0nw0nk April 18, 2018 05:00PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 97
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready