mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
Merge pull request #1728 from fuyouyshengwu/master
Seaweed custom header are not visible to Vue or javascript
This commit is contained in:
commit
eaac1a1393
|
@ -100,6 +100,16 @@ func (fs *FilerServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request,
|
||||||
w.Header().Set(k, string(v))
|
w.Header().Set(k, string(v))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Seaweed custom header are not visible to Vue or javascript
|
||||||
|
seaweedHeaders := []string{}
|
||||||
|
for header, _ := range w.Header() {
|
||||||
|
if strings.HasPrefix(header, "Seaweed-") {
|
||||||
|
seaweedHeaders = append(seaweedHeaders, header)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
seaweedHeaders = append(seaweedHeaders, "Content-Disposition")
|
||||||
|
w.Header().Set("Access-Control-Expose-Headers", strings.Join(seaweedHeaders, ","))
|
||||||
|
|
||||||
//set tag count
|
//set tag count
|
||||||
if r.Method == "GET" {
|
if r.Method == "GET" {
|
||||||
tagCount := 0
|
tagCount := 0
|
||||||
|
|
Loading…
Reference in a new issue