Skip to content
Snippets Groups Projects
Select Git revision
  • 09a55aab01d32b0b38e05f60362a195287034f88
  • master default protected
  • dev
3 results

streamviewer.conf

Blame
  • streamviewer.conf 1.43 KiB
    server {
        listen 80;
        listen [::]:80;
    
        add_header Cache-Control   no-cache;
        add_header Strict-Transport-Security "max-age=31536000; includeSubdomains; preload;";
        add_header x-frame-options SAMEORIGIN;
        add_header X-Content-Type-Options nosniff;
        add_header X-XSS-Protection "1; mode=block";
    
        client_max_body_size 10M;
        client_body_buffer_size 128k;
        charset utf-8;
    
        location / {
            include proxy_params;
            proxy_pass http://127.0.0.1:8000;
        }
    
        location ~ /.git/ {
      		deny all;
        }
    
        location /hls {
                # Disable cache
                add_header Cache-Control no-cache;
    
                # CORS setup
                add_header 'Access-Control-Allow-Origin' '*' always;
                add_header 'Access-Control-Expose-Headers' 'Content-Length';
    
                # allow CORS preflight requests
                if ($request_method = 'OPTIONS') {
                	add_header 'Access-Control-Allow-Origin' '*';
                	add_header 'Access-Control-Max-Age' 1728000;
                	add_header 'Content-Type' 'text/plain charset=UTF-8';
                	add_header 'Content-Length' 0;
                	return 204;
                }
                root /data;
        }
    
        location /socket.io {
            include proxy_params;
            proxy_http_version 1.1;
            proxy_buffering off;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "Upgrade";
            proxy_pass http://127.0.0.1:8000/socket.io;
        }
    }