Skip to content
Draft
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
68 changes: 68 additions & 0 deletions CubeProxy/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,40 @@ http {
log_by_lua_file lua/log_phase.lua;
}

# Streaming gRPC SendInput: disable response buffering so each chunk
# from upstream is forwarded to the client immediately.
location = /process.Process/SendInput {
include /usr/local/openresty/nginx/conf/global/global.conf;
set $cube_retcode "310200";
set $garyscale_test "none";
set $backend_ip "";
set $backend_port "";
set $access_time "";
set $cache_free_space "";
set $host_proxy_port 8081;

proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";

proxy_send_timeout 7206s;
proxy_read_timeout 7206s;
proxy_connect_timeout 3s;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

proxy_buffering off;

rewrite_by_lua_file lua/rewrite_phase.lua;

proxy_pass http://backend;

header_filter_by_lua_file lua/header_filter_phase.lua;

log_by_lua_file lua/log_phase.lua;
}

location / {
include /usr/local/openresty/nginx/conf/global/global.conf;
set $cube_retcode "310200";
Expand Down Expand Up @@ -213,6 +247,40 @@ http {
log_by_lua_file lua/log_phase.lua;
}

# Streaming gRPC SendInput: disable response buffering so each chunk
# from upstream is forwarded to the client immediately.
location = /process.Process/SendInput {
include /usr/local/openresty/nginx/conf/global/global.conf;
set $cube_retcode "310200";
set $garyscale_test "none";
set $backend_ip "";
set $backend_port "";
set $access_time "";
set $cache_free_space "";
set $host_proxy_port 8080;

proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";

proxy_send_timeout 7206s;
proxy_read_timeout 7206s;
proxy_connect_timeout 3s;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

proxy_buffering off;

rewrite_by_lua_file lua/rewrite_phase.lua;

proxy_pass http://backend;

header_filter_by_lua_file lua/header_filter_phase.lua;

log_by_lua_file lua/log_phase.lua;
}

location / {
include /usr/local/openresty/nginx/conf/global/global.conf;
set $cube_retcode "310200";
Expand Down
Loading