1
0
mirror of https://github.com/sasjs/adapter.git synced 2025-12-11 01:14:36 +00:00

fix(insecure-requests): add flag to config

This commit is contained in:
Krishna Acondy
2021-02-05 09:33:42 +00:00
parent c7be71c781
commit a5683bcd07
2 changed files with 12 additions and 2 deletions

View File

@@ -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

View File

@@ -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
}