Vendor the web assets from Lesavka a5758755. The RCT browser performs signal recognition and sends numeric observations through the existing receipt service.
64 lines
2.9 KiB
Nginx Configuration File
64 lines
2.9 KiB
Nginx Configuration File
worker_processes 1;
|
|
pid /tmp/nginx.pid;
|
|
error_log /dev/stderr warn;
|
|
events { worker_connections 128; }
|
|
http {
|
|
include /etc/nginx/mime.types;
|
|
default_type application/octet-stream;
|
|
access_log off;
|
|
server_tokens off;
|
|
client_max_body_size 4k;
|
|
client_body_timeout 5s;
|
|
client_header_timeout 5s;
|
|
client_body_temp_path /tmp/client;
|
|
proxy_temp_path /tmp/proxy;
|
|
fastcgi_temp_path /tmp/fastcgi;
|
|
uwsgi_temp_path /tmp/uwsgi;
|
|
scgi_temp_path /tmp/scgi;
|
|
server {
|
|
listen 8080;
|
|
absolute_redirect off;
|
|
root /usr/share/nginx/html;
|
|
add_header Cache-Control "no-store" always;
|
|
add_header X-Content-Type-Options "nosniff" always;
|
|
add_header X-Frame-Options "DENY" always;
|
|
add_header Referrer-Policy "no-referrer" always;
|
|
add_header Permissions-Policy "camera=(self), microphone=(self), speaker-selection=(self), geolocation=(), display-capture=()" always;
|
|
add_header Cross-Origin-Opener-Policy "same-origin" always;
|
|
add_header Content-Security-Policy "default-src 'none'; script-src 'self'; style-src 'self'; media-src 'self' blob:; connect-src 'self'; worker-src 'self'; object-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'" always;
|
|
location = /lesavka-av-test { return 308 /av-test/; }
|
|
location = /lesavka-av-test/ { return 308 /av-test/; }
|
|
location = /lesavka-av-test/index.html { return 308 /av-test/; }
|
|
# Kubelet checks the running listener without spawning Python each time.
|
|
# This path is outside the observer's public ingress prefixes.
|
|
location = /healthz {
|
|
proxy_pass http://127.0.0.1:8081/healthz;
|
|
proxy_connect_timeout 2s;
|
|
proxy_read_timeout 2s;
|
|
proxy_pass_request_headers off;
|
|
}
|
|
location = /av-test { return 308 /av-test/; }
|
|
location = /av-test/ {
|
|
if ($request_method !~ ^(GET|HEAD)$) { return 405; }
|
|
try_files /av-test/index.html =404;
|
|
}
|
|
location ~ ^/av-test/(acoustic-detector\.js|acoustic-pattern\.js|acoustic-watch\.js|acoustic-worklet\.js|phone-source\.js|phone\.html|mic\.html|mic-observer\.js|mic-reporting\.js|mic-output\.js|index\.html|observer\.js|local-recording\.js|review-controls\.js|metrics\.js|reporting\.js|activity-worklet\.js|paired-observer\.js|paired-worklet\.js|paired-signals\.js|test-signals\.js|continuity-signals\.js|pilot-window\.js|capture-lifecycle\.js|continuity-watch\.js|style\.css)$ {
|
|
if ($request_method !~ ^(GET|HEAD)$) { return 405; }
|
|
try_files $uri =404;
|
|
}
|
|
location ~ ^/av-test/api/(start|report)$ {
|
|
if ($request_method != POST) { return 405; }
|
|
proxy_pass http://127.0.0.1:8081;
|
|
proxy_connect_timeout 2s;
|
|
proxy_read_timeout 5s;
|
|
proxy_send_timeout 5s;
|
|
proxy_pass_request_headers off;
|
|
proxy_set_header Content-Type $http_content_type;
|
|
proxy_set_header Origin $http_origin;
|
|
proxy_set_header Authorization $http_authorization;
|
|
proxy_set_header Host localhost;
|
|
}
|
|
location / { return 404; }
|
|
}
|
|
}
|