mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
Revert "Support basic auth in opencode sdk (#4697)"
This reverts commit b9253d0b3b.
This commit is contained in:
parent
997aacf7f0
commit
3b2aa7e91d
1 changed files with 0 additions and 13 deletions
|
|
@ -24,19 +24,6 @@ export function createOpencodeClient(config?: Config & { directory?: string }) {
|
|||
}
|
||||
}
|
||||
|
||||
if (config?.baseUrl) {
|
||||
const baseUrl = new URL(config.baseUrl)
|
||||
if (baseUrl.username || baseUrl.password) {
|
||||
config.headers = {
|
||||
...config.headers,
|
||||
Authorization: `Basic ${btoa(`${baseUrl.username}:${baseUrl.password}`)}`,
|
||||
}
|
||||
baseUrl.username = ""
|
||||
baseUrl.password = ""
|
||||
config.baseUrl = baseUrl.toString()
|
||||
}
|
||||
}
|
||||
|
||||
const client = createClient(config)
|
||||
return new OpencodeClient({ client })
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue