use skynet server api env variable to rewrite proxy response on /tus endpoint

This commit is contained in:
Karol Wypchlo 2021-06-16 13:06:49 +02:00
parent 9b2285e86a
commit cb85ed355a
2 changed files with 5 additions and 3 deletions

View File

@ -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 {

View File

@ -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;