fix
This commit is contained in:
parent
4f93028c1a
commit
8a7f41701d
|
@ -9,13 +9,13 @@ include /etc/nginx/conf.d/include/proxy-cache-downloads;
|
||||||
#### this is important because we want only one format in cache keys and logs
|
#### this is important because we want only one format in cache keys and logs
|
||||||
###set_by_lua_block $skylink { return require("skynet.skylink").parse(ngx.var.skylink) }
|
###set_by_lua_block $skylink { return require("skynet.skylink").parse(ngx.var.skylink) }
|
||||||
###
|
###
|
||||||
$skylink_v1 and $skylink_v2 variables default to the same value but in case the requested skylink was:
|
###$skylink_v1 and $skylink_v2 variables default to the same value but in case the requested skylink was:
|
||||||
#### a) skylink v1 - it would not matter, no additional logic is executed
|
#### a) skylink v1 - it would not matter, no additional logic is executed
|
||||||
#### b) skylink v2 - in a lua block below we will resolve the skylink v2 into skylink v1 and update
|
#### b) skylink v2 - in a lua block below we will resolve the skylink v2 into skylink v1 and update
|
||||||
#### $skylink_v1 variable so then the proxy request to skyd can be cached in nginx (proxy_cache_key
|
#### $skylink_v1 variable so then the proxy request to skyd can be cached in nginx (proxy_cache_key
|
||||||
#### in proxy-cache-downloads includes $skylink_v1 as a part of the cache key)
|
#### in proxy-cache-downloads includes $skylink_v1 as a part of the cache key)
|
||||||
###set $skylink_v1 $skylink;
|
set $skylink_v1 $skylink;
|
||||||
###set $skylink_v2 $skylink;
|
set $skylink_v2 $skylink;
|
||||||
###
|
###
|
||||||
#### variable for Skynet-Proof header that we need to inject
|
#### variable for Skynet-Proof header that we need to inject
|
||||||
#### into a response if the request was for skylink v2
|
#### into a response if the request was for skylink v2
|
||||||
|
|
Reference in New Issue