diff --git a/conf/nginx.conf.tpl b/conf/nginx.conf.tpl index 15da2fb..050eb2e 100644 --- a/conf/nginx.conf.tpl +++ b/conf/nginx.conf.tpl @@ -1,4 +1,5 @@ -worker_processes 1; +worker_processes 2; +pcre_jit on; # expose env vars to lua code env BENTO_DEBUG; @@ -7,7 +8,8 @@ env BENTO_AUTHZ_SERVICE_URL; error_log stderr info; events { - worker_connections 1024; + worker_connections 2048; + use epoll; # Should be default on Linux, but explicitly use it } # tpl__tls_yes__start @@ -49,6 +51,9 @@ http { # Allow SNI-based proxying proxy_ssl_server_name on; + # Allow sendfile() for sending small files directly + sendfile on; + # Set up log format log_format compression '$remote_addr - $remote_user [$time_local] ' '"$request" $status $body_bytes_sent ' diff --git a/src/proxy_auth_v2.lua b/src/proxy_auth_v2.lua index 7c97766..94c897f 100644 --- a/src/proxy_auth_v2.lua +++ b/src/proxy_auth_v2.lua @@ -58,6 +58,8 @@ local uri = ngx.var.uri -- post-rewrite URI if req_method == "GET" and ( uri == "/service-info" or -- any service-info endpoint; rewritten from original /api/.../service-info + uri == "/workflows" or -- any workflow-providing endpoint; rewritten from original /api/.../workflows + uri:sub(1, 11) == "/workflows/" or -- " req_uri_no_qp == "/api/metadata/api/projects" or req_uri_no_qp == "/api/metadata/api/public" or req_uri_no_qp == "/api/metadata/api/public_overview" or