openresty / headers-more-nginx-module

Set, add, and clear arbitrary output headers in NGINX http servers
1.65k stars 221 forks source link

error_page disables more_set_headers #127

Open RekGRpth opened 2 years ago

RekGRpth commented 2 years ago

compare

more_set_headers "name1: value1";
location =/one {
    more_set_headers "name2: value2";
    return 303 OK;
}

and

location @error {
    return 200 OK;
}
more_set_headers "name1: value1";
location =/two {
    more_set_headers "name2: value2";
    error_page 303 = @error;
    return 303 OK;
}

if request one location, it adds two headers name1 with value1 and name2 with value2 but if request two location, it adds only one header name1 with value1