#
# Listen on local socket for nchan publishers
#
server {
    listen unix:/var/run/nginx.socket default_server;
    location ~ /pub/(.*)$ {
        nchan_publisher;
        nchan_channel_id "$1";
        nchan_message_buffer_length $arg_buffer_length;
        nchan_message_timeout 0;
    }
    location ~ /nchan_stub_status$ {
        nchan_stub_status;
    }
}
#
# Always accept http requests from localhost
# ex: http://localhost
# ex: http://127.0.0.1
# ex: http://[::1]
#
server {
    listen 127.0.0.1:80; # lo
    listen 127.0.0.1:443; # lo
    #
    add_header Content-Security-Policy "frame-ancestors 'self' ";
    include /etc/nginx/conf.d/locations.conf;
}
#
# Port settings for http protocol
# ex: http://tower  (IP address resolved via NetBIOS)
# ex: http://tower.local  (IP address resolved via mDNS)
# ex: http://192.168.1.100
# ex: http://[::ffff:192.168.1.100]
#
server {
    listen 192.168.178.20:80 default_server; # br0
    #
    add_header Content-Security-Policy "frame-ancestors 'self' ";
    location ~ /wsproxy/80/ { return 403; }
    include /etc/nginx/conf.d/locations.conf;
}
