Merge pull request #1120 from SkynetLabs/do-not-expose-requested-skylink-header
do not expose Skynet-Requested-Skylink
This commit is contained in:
commit
b4a7a0f058
|
@ -216,6 +216,14 @@ location /skynet/pin {
|
||||||
location /skynet/metadata {
|
location /skynet/metadata {
|
||||||
include /etc/nginx/conf.d/include/cors;
|
include /etc/nginx/conf.d/include/cors;
|
||||||
|
|
||||||
|
header_filter_by_lua_block {
|
||||||
|
ngx.header["Skynet-Portal-Api"] = os.getenv("SKYNET_PORTAL_API")
|
||||||
|
ngx.header["Skynet-Server-Api"] = os.getenv("SKYNET_SERVER_API")
|
||||||
|
|
||||||
|
-- do not expose internal header
|
||||||
|
ngx.header["Skynet-Requested-Skylink"] = ""
|
||||||
|
}
|
||||||
|
|
||||||
proxy_set_header User-Agent: Sia-Agent;
|
proxy_set_header User-Agent: Sia-Agent;
|
||||||
proxy_pass http://sia:9980;
|
proxy_pass http://sia:9980;
|
||||||
}
|
}
|
||||||
|
@ -223,6 +231,14 @@ location /skynet/metadata {
|
||||||
location /skynet/resolve {
|
location /skynet/resolve {
|
||||||
include /etc/nginx/conf.d/include/cors;
|
include /etc/nginx/conf.d/include/cors;
|
||||||
|
|
||||||
|
header_filter_by_lua_block {
|
||||||
|
ngx.header["Skynet-Portal-Api"] = os.getenv("SKYNET_PORTAL_API")
|
||||||
|
ngx.header["Skynet-Server-Api"] = os.getenv("SKYNET_SERVER_API")
|
||||||
|
|
||||||
|
-- do not expose internal header
|
||||||
|
ngx.header["Skynet-Requested-Skylink"] = ""
|
||||||
|
}
|
||||||
|
|
||||||
proxy_set_header User-Agent: Sia-Agent;
|
proxy_set_header User-Agent: Sia-Agent;
|
||||||
proxy_pass http://sia:9980;
|
proxy_pass http://sia:9980;
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue