MCPcopy Create free account
hub / github.com/OpenListTeam/OpenList / GenerateDownProxyURL

Function GenerateDownProxyURL

server/common/proxy.go:145–158  ·  view source on GitHub ↗
(storage *model.Storage, reqPath string)

Source from the content-addressed store, hash-verified

143}
144
145func GenerateDownProxyURL(storage *model.Storage, reqPath string) string {
146 if storage.DownProxyURL == "" {
147 return ""
148 }
149 query := ""
150 if !storage.DisableProxySign {
151 query = "?sign=" + sign.Sign(reqPath)
152 }
153 return fmt.Sprintf("%s%s%s",
154 strings.Split(storage.DownProxyURL, "\n")[0],
155 utils.EncodePath(reqPath, true),
156 query,
157 )
158}

Callers 6

handleGetHeadPostMethod · 0.92
proxyFileURLFunction · 0.92
buildFSGetRawURLFunction · 0.92
SharingDownFunction · 0.92
FsGetFunction · 0.92
ProxyFunction · 0.92

Calls 2

SignFunction · 0.92
EncodePathFunction · 0.92

Tested by

no test coverage detected