From cb85ed355ac56f05368013405a7ce316d82fd297 Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Wed, 16 Jun 2021 13:06:49 +0200 Subject: [PATCH] use skynet server api env variable to rewrite proxy response on /tus endpoint --- docker/nginx/conf.d/client.conf | 2 +- docker/nginx/nginx.conf | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docker/nginx/conf.d/client.conf b/docker/nginx/conf.d/client.conf index e77a54a8..69c6fef4 100644 --- a/docker/nginx/conf.d/client.conf +++ b/docker/nginx/conf.d/client.conf @@ -334,7 +334,7 @@ server { proxy_pass http://siad; # rewrite tus headers to use correct uri - proxy_redirect https://siad/ https://$domain.$tld/; + proxy_redirect https://siad $SKYNET_SERVER_API; # extract skylink from base64 encoded upload metadata and assign to a proper header header_filter_by_lua_block { diff --git a/docker/nginx/nginx.conf b/docker/nginx/nginx.conf index fe14b0a4..75f807f9 100644 --- a/docker/nginx/nginx.conf +++ b/docker/nginx/nginx.conf @@ -25,8 +25,10 @@ worker_processes 1; #pid logs/nginx.pid; -env SKYNET_PORTAL_API; # declare env variable to use it in config -env ACCOUNTS_ENABLED; # declare env variable to use it in config +# declare env variables to use it in config +env SKYNET_PORTAL_API; +env SKYNET_SERVER_API; +env ACCOUNTS_ENABLED; events { worker_connections 1024;