Commit 0ea6199
authored
fix: Auth header when downloading images from tfs (#2877)
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.File tree
1 file changed
+11
-1
lines changed- src/MigrationTools.Clients.TfsObjectModel/Tools
1 file changed
+11
-1
lines changedLines changed: 11 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 | + | |
| 144 | + | |
136 | 145 | | |
| 146 | + | |
137 | 147 | | |
138 | 148 | | |
139 | 149 | | |
| |||
0 commit comments