Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions gateway/nginx/conf.d/shellhub.conf
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,25 @@ server {
proxy_pass http://upstream_router;
}

{{ if $cfg.EnableEnterprise -}}
location ~ ^/api/namespaces/([^/]+)/support$ {
{{ set_upstream "cloud-api" 8080 }}

auth_request /auth;
auth_request_set $tenant_id $upstream_http_x_tenant_id;
auth_request_set $username $upstream_http_x_username;
auth_request_set $id $upstream_http_x_id;
auth_request_set $role $upstream_http_x_role;
error_page 500 =401 /auth;
proxy_http_version 1.1;
proxy_set_header X-ID $id;
proxy_set_header X-Role $role;
proxy_set_header X-Tenant-ID $tenant_id;
proxy_set_header X-Username $username;
proxy_pass http://upstream_router;
}
{{ end -}}

location ~ ^/(install.sh|kickstart.sh)$ {
{{ set_upstream "api" 8080 }}

Expand Down
Loading