1
0
mirror of https://github.com/haiwen/seafile-server.git synced 2025-09-01 15:36:37 +00:00

Use Authorization header (#675)

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
This commit is contained in:
feiniks
2024-08-01 11:25:31 +08:00
committed by GitHub
parent 77fa08566b
commit a535c64d13
3 changed files with 15 additions and 4 deletions

View File

@@ -384,7 +384,7 @@ http_post (Connection *conn, const char *url, const char *token,
headers = curl_slist_append (headers, "User-Agent: Seafile/"SEAFILE_CLIENT_VERSION" ("USER_AGENT_OS")");
if (token) {
token_header = g_strdup_printf ("Seafile-Repo-Token: %s", token);
token_header = g_strdup_printf ("Authorization: Token %s", token);
headers = curl_slist_append (headers, token_header);
g_free (token_header);
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);