mirror of
https://github.com/AlistGo/alist.git
synced 2025-04-24 22:34:04 +08:00
revert(quark): remove preset range header
This commit is contained in:
parent
ecd167d2f9
commit
7f35aab071
@ -71,9 +71,6 @@ func (d *Quark) Link(ctx context.Context, file model.Obj, args model.LinkArgs) (
|
||||
"Referer": []string{"https://pan.quark.cn"},
|
||||
"User-Agent": []string{ua},
|
||||
},
|
||||
PresetHeader: http.Header{
|
||||
"Range": []string{"bytes=0-"},
|
||||
},
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
@ -17,13 +17,12 @@ type LinkArgs struct {
|
||||
}
|
||||
|
||||
type Link struct {
|
||||
URL string `json:"url"`
|
||||
Header http.Header `json:"header"` // needed header
|
||||
PresetHeader http.Header `json:"preset_header"`
|
||||
Data io.ReadCloser // return file reader directly
|
||||
Status int // status maybe 200 or 206, etc
|
||||
FilePath *string // local file, return the filepath
|
||||
Expiration *time.Duration // url expiration time
|
||||
URL string `json:"url"`
|
||||
Header http.Header `json:"header"` // needed header
|
||||
Data io.ReadCloser // return file reader directly
|
||||
Status int // status maybe 200 or 206, etc
|
||||
FilePath *string // local file, return the filepath
|
||||
Expiration *time.Duration // url expiration time
|
||||
}
|
||||
|
||||
type OtherArgs struct {
|
||||
|
@ -77,10 +77,6 @@ func Proxy(w http.ResponseWriter, r *http.Request, link *model.Link, file model.
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// preset header
|
||||
for h, val := range link.PresetHeader {
|
||||
req.Header[h] = val
|
||||
}
|
||||
// client header
|
||||
for h, val := range r.Header {
|
||||
if utils.SliceContains(conf.SlicesMap[conf.ProxyIgnoreHeaders], strings.ToLower(h)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user