Skip to content

Commit

Permalink
content-type to allowedHeadersArr
Browse files Browse the repository at this point in the history
When using browser to request resource from IPFS, browser uses a preflight request with content-type header. So without content-type in the allowed list, the request will fail.
  • Loading branch information
popmanhe authored Jan 3, 2019
1 parent d06cf14 commit 6ff85fe
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions core/corehttp/gateway_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ func (i *gatewayHandler) getOrHeadHandler(ctx context.Context, w http.ResponseWr
"Content-Range",
"X-Chunked-Output",
"X-Stream-Output",
"content-type"
}

var allowedHeaders = strings.Join(allowedHeadersArr, ", ")
Expand Down

1 comment on commit 6ff85fe

@GitCop
Copy link

@GitCop GitCop commented on 6ff85fe Jan 3, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There were the following issues with your Pull Request

We ask for a few features in the commit message for Open Source licensing hygiene and commit message clarity.
git commit --amend can often help you quickly improve the commit message.
Guidelines and a script are available to help in the long run.
Your feedback on GitCop is welcome on this issue.


This message was auto-generated by https://gitcop.com

Please sign in to comment.