Skip to content

Commit

Permalink
Merge pull request #187 from jumpserver/pr@v4@perf_razor
Browse files Browse the repository at this point in the history
perf: 优化 razor 判断
  • Loading branch information
wojiushixiaobai committed Jun 12, 2024
2 parents 19f886c + ce6a504 commit f937475
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
15 changes: 15 additions & 0 deletions includes/razor.conf.disabled
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
location /razor/ {
proxy_pass http://razor:8084;
proxy_buffering off;
proxy_http_version 1.1;
proxy_request_buffering off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_ignore_client_abort on;
proxy_connect_timeout 600;
proxy_send_timeout 600;
proxy_read_timeout 600;
send_timeout 6000;
}
6 changes: 6 additions & 0 deletions init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,12 @@ function config_components() {
if [ "${KAEL_ENABLED}" == "0" ]; then
mv /etc/nginx/includes/kael.conf /etc/nginx/includes/kael.conf.disabled
fi

if [ "${USE_XPACK}" == "1" ]; then
if [ "${RAZOR_ENABLED}" != "0" ]; then
mv /etc/nginx/includes/razor.conf.disabled /etc/nginx/includes/razor.conf
fi
fi
}

function main() {
Expand Down

0 comments on commit f937475

Please sign in to comment.