Skip to content

Commit 2bb02f9

Browse files
committed
Fix getting headers on login
At this stage the URL may not be set. Or it could be set to the previous URL. We need to use the URL of the actual request.
1 parent 5923769 commit 2bb02f9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/extension.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,10 @@ export async function activate(ctx: vscode.ExtensionContext): Promise<void> {
6161

6262
// Add headers from the header command.
6363
axios.interceptors.request.use(async (config) => {
64-
Object.entries(await storage.getHeaders()).forEach(([key, value]) => {
65-
config.headers[key] = value
66-
})
64+
Object.entries(await storage.getHeaders(config.baseURL || axios.getUri(config)))
65+
.forEach(([key, value]) => {
66+
config.headers[key] = value
67+
})
6768
return config
6869
})
6970

0 commit comments

Comments
 (0)