Skip to content

Commit

Permalink
feat(gateway): add proxy config for sys extension api
Browse files Browse the repository at this point in the history
  • Loading branch information
maslow committed Dec 24, 2021
1 parent c638181 commit 4a39c79
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions packages/gateway/system.conf
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,27 @@ server {
proxy_send_timeout 600s;
proxy_read_timeout 600s;
}

location /sys-extension-api/ {
# resolve app service
resolver 127.0.0.11;
set $appid "00000000-0000-0000-0000-000000000000";
set $service_id app_$appid;

if ($uri ~* "/sys-extension-api/(.*)$") {
set $proxy_uri $1$is_args$query_string;
}

proxy_pass http://$service_id:8000/$proxy_uri;
proxy_send_timeout 600s;
proxy_read_timeout 600s;

# Upgrade websocket
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}


Expand Down

0 comments on commit 4a39c79

Please sign in to comment.