Avoid xattr printed out as HTTP headers
fix https://github.com/chrislusf/seaweedfs/issues/2336
This commit is contained in:
@@ -97,7 +97,10 @@ func (fs *FilerServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request)
|
||||
|
||||
// print out the header from extended properties
|
||||
for k, v := range entry.Extended {
|
||||
w.Header().Set(k, string(v))
|
||||
if !strings.HasPrefix(k, "xattr-") {
|
||||
// "xattr-" prefix is set in filesys.XATTR_PREFIX
|
||||
w.Header().Set(k, string(v))
|
||||
}
|
||||
}
|
||||
|
||||
//Seaweed custom header are not visible to Vue or javascript
|
||||
|
||||
Reference in New Issue
Block a user