Skip to content

Commit

Permalink
Merge pull request #127 from RaphaelManke/fix-http-agent-configuration
Browse files Browse the repository at this point in the history
Fix gateway config for schema registry SSL connection
  • Loading branch information
Nevon authored Jun 11, 2021
2 parents 8efbdd6 + 1d2f2ed commit b3e8e69
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/api/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Agent } from 'http'
import forge, { Authorization, Client, Options } from 'mappersmith'
import forge, { Authorization, Client, Options, GatewayConfiguration } from 'mappersmith'
import RetryMiddleware, { RetryMiddlewareOptions } from 'mappersmith/middleware/retry/v2'
import BasicAuthMiddleware from 'mappersmith/middleware/basic-auth'

Expand Down Expand Up @@ -108,8 +108,10 @@ export default ({
// if an agent was provided, bind the agent to the mappersmith configs
if (agent) {
// gatewayConfigs is not listed as a type on manifest object in mappersmith
;(manifest as any).gatewayConfigs = {
configure: () => ({ agent }),
;((manifest as unknown) as { gatewayConfigs: Partial<GatewayConfiguration> }).gatewayConfigs = {
HTTP: {
configure: () => ({ agent }),
},
}
}
return forge(manifest)
Expand Down

0 comments on commit b3e8e69

Please sign in to comment.