Commit 0e42413
committed
fix: Auth header when downloading images from tfs
Updated the logic for setting the `Authorization` header in `HttpClient` to improve security and flexibility. The code now checks if the `sourcePersonalAccessToken` is not empty and if the `matchedSourceUri` contains "tfs/DefaultCollection". If both conditions are met, the token is encoded in Base64 with an empty username; otherwise, the token is set directly if it's not empty.1 parent 9f79e9a commit 0e42413
File tree
1 file changed
+9
-1
lines changed- src/MigrationTools.Clients.TfsObjectModel/Tools
1 file changed
+9
-1
lines changedLines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | | - | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
136 | 144 | | |
137 | 145 | | |
138 | 146 | | |
| |||
0 commit comments