Skip to content

Commit

Permalink
feat: constructing url in auth
Browse files Browse the repository at this point in the history
  • Loading branch information
Souvikns committed Dec 12, 2023
1 parent e37bb1d commit 5780a96
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 0 additions & 5 deletions src/adapters/ws/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,6 @@ class WsClientAdapter extends Adapter {
const modedAuth = await gleeAuth.processClientAuth({ url, headers, query: {} })
headers = modedAuth.headers
url = modedAuth.url
if (modedAuth.query) {
Object.keys(modedAuth.query).forEach(k => {
url.searchParams.set(k, modedAuth.query[k])
})
}
}
this.clients.push({
channel: channelName,
Expand Down
6 changes: 5 additions & 1 deletion src/lib/wsHttpAuth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,11 @@ class GleeAuth extends EventEmitter {
const conf = this.httpApiKeyLogic(scheme, headers, query, authKey)
headers = conf.headers
query = conf.query

if (query) {
Object.keys(query).forEach(k => {
url.searchParams.set(k, query[k])

Check warning on line 82 in src/lib/wsHttpAuth.ts

View workflow job for this annotation

GitHub Actions / Test NodeJS PR - ubuntu-latest

Function Call Object Injection Sink

Check warning on line 82 in src/lib/wsHttpAuth.ts

View workflow job for this annotation

GitHub Actions / Test NodeJS PR - macos-latest

Function Call Object Injection Sink
})
}
}
})
return { url, headers, query }
Expand Down

0 comments on commit 5780a96

Please sign in to comment.