server {
    listen %%interface%%:%%port%% default_server;
    include /etc/nginx/includes/server_params.conf;
    include /etc/nginx/includes/proxy_params.conf;
    client_max_body_size 0;
    server_name resiliosync.*;

    location / {
       add_header Access-Control-Allow-Origin *;
       proxy_pass http://127.0.0.1:8888/gui/;
       sub_filter_types text/javascript;
       sub_filter "/gui/" "";
       sub_filter_once off;
       proxy_buffering off;
       proxy_read_timeout 30;
       proxy_set_header Accept-Encoding "";
       proxy_set_header Connection "Upgrade";
       proxy_set_header Upgrade $http_upgrade;
       proxy_set_header Host $host;
    }
}

