use skynet server api env variable to rewrite proxy response on /tus endpoint
This commit is contained in:
parent
9b2285e86a
commit
cb85ed355a
|
@ -334,7 +334,7 @@ server {
|
||||||
proxy_pass http://siad;
|
proxy_pass http://siad;
|
||||||
|
|
||||||
# rewrite tus headers to use correct uri
|
# 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
|
# extract skylink from base64 encoded upload metadata and assign to a proper header
|
||||||
header_filter_by_lua_block {
|
header_filter_by_lua_block {
|
||||||
|
|
|
@ -25,8 +25,10 @@ worker_processes 1;
|
||||||
|
|
||||||
#pid logs/nginx.pid;
|
#pid logs/nginx.pid;
|
||||||
|
|
||||||
env SKYNET_PORTAL_API; # declare env variable to use it in config
|
# declare env variables to use it in config
|
||||||
env ACCOUNTS_ENABLED; # declare env variable to use it in config
|
env SKYNET_PORTAL_API;
|
||||||
|
env SKYNET_SERVER_API;
|
||||||
|
env ACCOUNTS_ENABLED;
|
||||||
|
|
||||||
events {
|
events {
|
||||||
worker_connections 1024;
|
worker_connections 1024;
|
||||||
|
|
Reference in New Issue