Added X-Request-CID
This commit is contained in:
parent
5382255219
commit
566bcaffb9
|
@ -142,7 +142,8 @@ func handleQueryRequest(ctx *fasthttp.RequestCtx, identifier cid.Cid, extraArgum
|
|||
mh, _ := multihash.Decode(cacheEntry.Entry.Identifier.Hash())
|
||||
|
||||
ctx.Response.Header.Set("Accept-Ranges", "bytes")
|
||||
ctx.Response.Header.Set("ETag", cacheEntry.Entry.Identifier.String())
|
||||
ctx.Response.Header.Set("X-Request-CID", identifier.String())
|
||||
ctx.Response.Header.Set("ETag", fmt.Sprintf("\"%s\"", cacheEntry.Entry.Identifier.String()))
|
||||
if mh.Code == multihash.SHA2_256 {
|
||||
ctx.Response.Header.Set("Digest", fmt.Sprintf("sha-256=%s", base64.StdEncoding.EncodeToString(mh.Digest)))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue