mirror of https://github.com/Xhofe/alist
✨ proxy add account
parent
36d52e0b75
commit
0b7f2fee7d
|
@ -230,7 +230,7 @@ func (c Cloud189) Link(path string, account *model.Account) (string, error) {
|
|||
return resp.FileDownloadUrl, nil
|
||||
}
|
||||
|
||||
func (c Cloud189) Proxy(ctx *gin.Context) {
|
||||
func (c Cloud189) Proxy(ctx *gin.Context, account *model.Account) {
|
||||
ctx.Request.Header.Del("Origin")
|
||||
}
|
||||
|
||||
|
|
|
@ -103,7 +103,7 @@ func (a AliDrive) Items() []Item {
|
|||
}
|
||||
}
|
||||
|
||||
func (a AliDrive) Proxy(c *gin.Context) {
|
||||
func (a AliDrive) Proxy(c *gin.Context, account *model.Account) {
|
||||
c.Request.Header.Del("Origin")
|
||||
c.Request.Header.Set("Referer", "https://www.aliyundrive.com/")
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ type Driver interface {
|
|||
Save(account *model.Account, old *model.Account) error
|
||||
Path(path string, account *model.Account) (*model.File, []*model.File, error)
|
||||
Link(path string, account *model.Account) (string, error)
|
||||
Proxy(c *gin.Context)
|
||||
Proxy(c *gin.Context, account *model.Account)
|
||||
Preview(path string, account *model.Account) (interface{}, error)
|
||||
// TODO
|
||||
//Search(path string, keyword string, account *model.Account) ([]*model.File, error)
|
||||
|
|
|
@ -31,7 +31,7 @@ func (n Native) Items() []Item {
|
|||
}
|
||||
}
|
||||
|
||||
func (n Native) Proxy(c *gin.Context) {
|
||||
func (n Native) Proxy(c *gin.Context, account *model.Account) {
|
||||
// unnecessary
|
||||
}
|
||||
|
||||
|
|
|
@ -301,7 +301,7 @@ func (o Onedrive) Save(account *model.Account, old *model.Account) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (o Onedrive) Proxy(c *gin.Context) {
|
||||
func (o Onedrive) Proxy(c *gin.Context, account *model.Account) {
|
||||
c.Request.Header.Del("Origin")
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue