From f7f55cf56a6ef209bf2b01928a7b2ef9bcb9481b Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Thu, 4 Nov 2021 10:54:41 +0100 Subject: [PATCH] the nginx configuration skips the call to pep.js. --- templates/nginx.conf.j2 | 1 - templates/nginx.default.conf.j2 | 18 +++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/templates/nginx.conf.j2 b/templates/nginx.conf.j2 index 028eff5..7aa23c3 100644 --- a/templates/nginx.conf.j2 +++ b/templates/nginx.conf.j2 @@ -10,7 +10,6 @@ http { js_import pep.js; js_set $authorization pep.enforce; - underscores_in_headers on; proxy_cache_path /var/cache/nginx/pep keys_zone=token_responses:1m max_size=2m; include /etc/nginx/conf.d/*.conf; include /etc/nginx/sites-enabled/*; diff --git a/templates/nginx.default.conf.j2 b/templates/nginx.default.conf.j2 index 8261d5c..a906c14 100644 --- a/templates/nginx.default.conf.j2 +++ b/templates/nginx.default.conf.j2 @@ -1,3 +1,9 @@ +proxy_cache_path /var/cache/nginx/pep keys_zone=token_responses:1m max_size=2m; +js_var $auth_token; +js_var $pep_credentials; +js_var $remote_user; +underscores_in_headers on; + upstream _inception-server { ip_hash; server {{ inception_project_docker_service_name }}:{{ inception_project_server_port }}; @@ -7,12 +13,11 @@ map $http_authorization $source_auth { default ""; } -js_var $auth_token; -js_var $pep_credentials; - server { listen *:{{ pep_port }}; server_name {{ inception_project_docker_service_name }}; + access_log /var/log/nginx/access.log; + error_log /var/log/nginx/error.log{% if nginx_pep_debug_enabled %}debug{% endif %}; {% if inception_project_websockets_enabled == 'true' %} proxy_set_header Upgrade $http_upgrade; @@ -21,11 +26,6 @@ server { location / { js_content pep.enforce; - proxy_request_buffering off; - proxy_buffering off; # Required for HTTP-based CLI to work over SSL - proxy_set_header Connection ""; # Clear for keepalive - proxy_set_header Host $host; - proxy_pass http://_inception-server; } location @backend { @@ -46,7 +46,7 @@ server { proxy_pass http://_inception-server; } - location /gcube_user_info { + location /gcube_user_info { internal; gunzip on; proxy_method GET;