From 6dbc580caa1e38940e99fe6cceb4542e8152e36f Mon Sep 17 00:00:00 2001 From: JaeMan Park Date: Tue, 10 Dec 2024 16:48:17 +0900 Subject: [PATCH] Add nginx configuration for WebSocket proxy While connecting to ADB via WebSocket, it also need to set additional header for nginx proxy. Change nginx config for that. --- .../etc/nginx/conf.d/cuttlefish-orchestration.conf | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/frontend/host/packages/cuttlefish-orchestration/etc/nginx/conf.d/cuttlefish-orchestration.conf b/frontend/host/packages/cuttlefish-orchestration/etc/nginx/conf.d/cuttlefish-orchestration.conf index 1e8c04cf79..0d792ce205 100644 --- a/frontend/host/packages/cuttlefish-orchestration/etc/nginx/conf.d/cuttlefish-orchestration.conf +++ b/frontend/host/packages/cuttlefish-orchestration/etc/nginx/conf.d/cuttlefish-orchestration.conf @@ -36,6 +36,15 @@ server { # Host Orchestrator location / { + # ADB websocket backend + location ~* ^/.*/adb$ { + proxy_pass http://127.0.0.1:2081; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "Upgrade"; + proxy_set_header Host $host; + } + proxy_pass http://127.0.0.1:2081; # This is required for uploading huge artifacts.