server {
    listen       80;
    listen  [::]:80;
    server_name  nginx;

    location /wiki/ {
            rewrite ^ $request_uri;
            rewrite ^/(.*) /public/$1 break;
            return 400;
            proxy_pass http://encyclopedia:5040$uri;

            proxy_set_header X-Context $remote_addr-$connection;
            proxy_set_header X-Public "1";
            proxy_set_header X-Extern-Url $scheme://$host$request_uri;
            proxy_set_header X-Extern-Domain $scheme://$host;
            proxy_set_header X-User-Agent $http_user_agent;

            tcp_nodelay on;
    }
    location /wiki-search {
            rewrite ^ $request_uri;
            rewrite ^/(.*) /public/$1 break;
            return 400;
            proxy_pass http://encyclopedia:5040$uri;

            proxy_set_header X-Context $remote_addr-$connection;
            proxy_set_header X-Public "1";
            proxy_set_header X-Extern-Url $scheme://$host$request_uri;
            proxy_set_header X-Extern-Domain $scheme://$host;
            proxy_set_header X-User-Agent $http_user_agent;


            tcp_nodelay on;
    }

    location / {
            proxy_pass http://encyclopedia:5040/;
            tcp_nodelay on;
    }
}
