do not expose Skynet-Requested-Skylink
This commit is contained in:
parent
626e370832
commit
c5afe554b5
|
@ -216,6 +216,14 @@ location /skynet/pin {
|
|||
location /skynet/metadata {
|
||||
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_pass http://sia:9980;
|
||||
}
|
||||
|
@ -223,6 +231,14 @@ location /skynet/metadata {
|
|||
location /skynet/resolve {
|
||||
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_pass http://sia:9980;
|
||||
}
|
||||
|
|
Reference in New Issue