Browse Source

Seaweed custom header are not visible to Vue or javascript

pull/1728/head
henry 4 years ago
parent
commit
1309dfe612
  1. 6
      weed/server/filer_server_handlers_read.go

6
weed/server/filer_server_handlers_read.go

@ -102,9 +102,9 @@ func (fs *FilerServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request,
//Add some custom headers that need to be exposed
seaweedHeaders := []string{}
for i, _ := range w.Header() {
if strings.Contains(i, "Seaweed") {
seaweedHeaders = append(seaweedHeaders, i)
for header, _ := range w.Header() {
if strings.HasPrefix(header, "Seaweed-") {
seaweedHeaders = append(seaweedHeaders, header)
}
}
seaweedHeaders = append(seaweedHeaders, "Content-Disposition")

Loading…
Cancel
Save