Skip to content

Latest commit

 

History

History
58 lines (40 loc) · 1.41 KB

allowInsecureRequests.md

File metadata and controls

58 lines (40 loc) · 1.41 KB

Function: allowInsecureRequests()

💗 Help the project

Support from the community to continue maintaining and improving this module is welcome. If you find the module useful, please consider supporting the project by becoming a sponsor.


allowInsecureRequests(config): void

By default the module only allows interactions with HTTPS endpoints. This removes that restriction.

Parameters

Parameter Type
config Configuration

Returns

void

Deprecated

Marked as deprecated only to make it stand out as something you shouldn't have the need to use, possibly only for local development and testing against non-TLS secured environments.

Examples

Usage with a Configuration obtained through discovery to also disable its HTTPS-only restriction.

let server!: URL
let clientId!: string
let clientMetadata!: Partial<client.ClientMetadata> | string | undefined
let clientAuth!: client.ClientAuth | undefined

let config = await client.discovery(
  server,
  clientId,
  clientMetadata,
  clientAuth,
  {
    execute: [client.allowInsecureRequests],
  },
)

Usage with a Configuration instance

let config!: client.Configuration

client.allowInsecureRequests(config)