Function: allowInsecureRequests()
August 29, 2025 ยท View on GitHub
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)