diff --git a/src/SASjs.ts b/src/SASjs.ts index 835d0e4..06e158e 100644 --- a/src/SASjs.ts +++ b/src/SASjs.ts @@ -21,7 +21,8 @@ const defaultConfig: SASjsConfig = { serverType: ServerType.SasViya, debug: false, contextName: 'SAS Job Execution compute context', - useComputeApi: false + useComputeApi: false, + allowInsecureRequests: false } /** @@ -715,7 +716,10 @@ export default class SASjs { this.sasjsConfig.serverUrl = this.sasjsConfig.serverUrl.slice(0, -1) } - this.requestClient = new RequestClient(this.sasjsConfig.serverUrl) + this.requestClient = new RequestClient( + this.sasjsConfig.serverUrl, + this.sasjsConfig.allowInsecureRequests + ) this.jobsPath = this.sasjsConfig.serverType === ServerType.SasViya diff --git a/src/types/SASjsConfig.ts b/src/types/SASjsConfig.ts index 4a9b041..e83ece0 100644 --- a/src/types/SASjsConfig.ts +++ b/src/types/SASjsConfig.ts @@ -57,4 +57,10 @@ export class SASjsConfig { * triggered using the APIs instead of the Job Execution Web Service broker. */ useComputeApi = false + /** + * Defaults to `false`. + * When set to `true`, the adapter will allow requests to SAS servers that use a self-signed SSL certificate. + * Changing this setting is not recommended. + */ + allowInsecureRequests = false }