Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3
Commits
3b60666d
Commit
3b60666d
authored
Aug 05, 2017
by
Jeromy Johnson
Committed by
GitHub
Aug 05, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4073 from icidasset/master
Expose Content-Range header
parents
542d6346
20ad44af
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
core/corehttp/gateway_handler.go
core/corehttp/gateway_handler.go
+11
-3
No files found.
core/corehttp/gateway_handler.go
View file @
3b60666d
...
...
@@ -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).
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment