Skip to content

Commit

Permalink
feat(cloudreve): add cookie2
Browse files Browse the repository at this point in the history
  • Loading branch information
xrgzs committed May 7, 2024
1 parent 4cbbda8 commit 2f1a9c7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions drivers/cloudreve/meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ type Addition struct {
Username string `json:"username"`
Password string `json:"password"`
Cookie string `json:"cookie"`
Cookie2 string `json:"cookie2"`
CustomUA string `json:"custom_ua"`
EnableThumbAndFolderSize bool `json:"enable_thumb_and_folder_size"`
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/cloudreve/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func (d *Cloudreve) request(method string, path string, callback base.ReqCallbac
}
req := base.RestyClient.R()
req.SetHeaders(map[string]string{
"Cookie": "cloudreve-session=" + d.Cookie,
"Cookie": "cloudreve-session=" + d.Cookie "; " + d.Cookie2,

Check failure on line 31 in drivers/cloudreve/util.go

View workflow job for this annotation

GitHub Actions / Build Docker

syntax error: unexpected literal "; " in composite literal; possibly missing comma or }

Check failure on line 31 in drivers/cloudreve/util.go

View workflow job for this annotation

GitHub Actions / Build Docker

syntax error: unexpected literal "; " in composite literal; possibly missing comma or }

Check failure on line 31 in drivers/cloudreve/util.go

View workflow job for this annotation

GitHub Actions / Build Docker

syntax error: unexpected literal "; " in composite literal; possibly missing comma or }

Check failure on line 31 in drivers/cloudreve/util.go

View workflow job for this annotation

GitHub Actions / Build Docker

syntax error: unexpected literal "; " in composite literal; possibly missing comma or }

Check failure on line 31 in drivers/cloudreve/util.go

View workflow job for this annotation

GitHub Actions / Build Docker

syntax error: unexpected literal "; " in composite literal; possibly missing comma or }

Check failure on line 31 in drivers/cloudreve/util.go

View workflow job for this annotation

GitHub Actions / Build Docker

syntax error: unexpected literal "; " in composite literal; possibly missing comma or }
"Accept": "application/json, text/plain, */*",
"User-Agent": ua,
})
Expand Down

0 comments on commit 2f1a9c7

Please sign in to comment.