location = /mesh {
    return 301 /mesh/;
}

location ~ ^/mesh/ {
    rewrite ^/mesh/(.*) /$1 break;
    proxy_pass http://127.0.0.1:19019;
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-For-Addr $server_addr;
    proxy_set_header X-Forwarded-For-Port $server_port;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Original-URI $request_uri;    
}
