Commit 3b60666d authored by Jeromy Johnson's avatar Jeromy Johnson Committed by GitHub

Merge pull request #4073 from icidasset/master

Expose Content-Range header
parents 542d6346 20ad44af
......@@ -208,9 +208,17 @@ func (i *gatewayHandler) getOrHeadHandler(ctx context.Context, w http.ResponseWr
w.Header().Set("Etag", etag)
// set 'allowed' headers
w.Header().Set("Access-Control-Allow-Headers", "X-Stream-Output, X-Chunked-Output")
// expose those headers
w.Header().Set("Access-Control-Expose-Headers", "X-Stream-Output, X-Chunked-Output")
// & expose those headers
var allowedHeadersArr = []string{
"Content-Range",
"X-Chunked-Output",
"X-Stream-Output",
}
var allowedHeaders = strings.Join(allowedHeadersArr, ", ")
w.Header().Set("Access-Control-Allow-Headers", allowedHeaders)
w.Header().Set("Access-Control-Expose-Headers", allowedHeaders)
// Suborigin header, sandboxes apps from each other in the browser (even
// though they are served from the same gateway domain).
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment