Integrate per-user browser runtimes into subagent API
This commit is contained in:
parent
952b2e7d17
commit
280247e1e5
11 changed files with 777 additions and 21 deletions
46
browser_env/nginx.browser-view.conf
Normal file
46
browser_env/nginx.browser-view.conf
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
events {}
|
||||
|
||||
http {
|
||||
resolver 127.0.0.11 ipv6=off;
|
||||
|
||||
map $http_upgrade $connection_upgrade {
|
||||
default upgrade;
|
||||
'' close;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 8080;
|
||||
server_name _;
|
||||
|
||||
location = / {
|
||||
add_header Content-Type text/plain;
|
||||
return 200 "Browser view proxy is running.\n";
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_buffering off;
|
||||
proxy_pass http://browser:6080;
|
||||
}
|
||||
|
||||
location ~ ^/view/(?<owner>[a-f0-9]{16})$ {
|
||||
return 302 /view/$owner/vnc.html?path=view/$owner/websockify;
|
||||
}
|
||||
|
||||
location ~ ^/view/(?<owner>[a-f0-9]{16})/(?<rest>.*)$ {
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_buffering off;
|
||||
proxy_pass http://browser-use-browser-$owner:6080/$rest$is_args$args;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue