Hi.
Am 09.08.2019 um 10:26 schrieb 姜伯洋:
> map $cookie_test_debug $forward_to_gray {
default 10.0.0.2;
I would suggest to add this entry according to the doc and remove the if blocks.
https://nginx.org/en/docs/http/ngx_http_map_module.html#map
> # forward to g
map $cookie_test_debug $forward_to_gray {
# forward to gray1
9cb88042edc55bf85c22e89cf880c63b 10.0.0.1;
}
location ~ ^/test/ {
root /data/www/project;
index index.html;
if ( $uri !~ (css|js)$ ) {
rewrite ^.*$ /test/index.html break;
}
map $cookie_test_debug $forward_to_gray {
# forward to gray1
9cb88042edc55bf85c22e89cf880c63b 10.0.0.1;
}
location ~ ^/test/ {
root /data/www/project;
index index.html;
if ( $uri !~ (css|js)$ ) {
rewrite ^.*$ /test/index.html break;
}