mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-10 05:40:06 +00:00
chore: removed httpsAgent type + clean up
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import * as https from 'https'
|
||||
import { ServerType } from '@sasjs/utils/types'
|
||||
import * as NodeFormData from 'form-data'
|
||||
import { ErrorResponse } from '../types/errors'
|
||||
import { convertToCSV, isRelativePath } from '../utils'
|
||||
import { BaseJobExecutor } from './JobExecutor'
|
||||
import { Sas9RequestClient } from '../request/Sas9RequestClient'
|
||||
import { HttpsAgent } from '../types/HttpsAgent'
|
||||
|
||||
/**
|
||||
* Job executor for SAS9 servers for use in Node.js environments.
|
||||
@@ -18,13 +18,10 @@ export class Sas9JobExecutor extends BaseJobExecutor {
|
||||
serverUrl: string,
|
||||
serverType: ServerType,
|
||||
private jobsPath: string,
|
||||
httpsAgentConfiguration: HttpsAgent
|
||||
httpsAgentOptions?: https.AgentOptions
|
||||
) {
|
||||
super(serverUrl, serverType)
|
||||
this.requestClient = new Sas9RequestClient(
|
||||
serverUrl,
|
||||
httpsAgentConfiguration
|
||||
)
|
||||
this.requestClient = new Sas9RequestClient(serverUrl, httpsAgentOptions)
|
||||
}
|
||||
|
||||
async execute(sasJob: string, data: any, config: any) {
|
||||
|
||||
15
src/job-execution/fixit.txt
Normal file
15
src/job-execution/fixit.txt
Normal file
@@ -0,0 +1,15 @@
|
||||
>> self signed certificate in certificate chain
|
||||
|
||||
|
||||
|
||||
const { key, cert } = serverCert
|
||||
const httpsServer = https.createServer(
|
||||
{
|
||||
key,
|
||||
cert,
|
||||
ca: rootCaCert.cert,
|
||||
requestCert: true,
|
||||
rejectUnauthorized: false
|
||||
},
|
||||
app
|
||||
)
|
||||
Reference in New Issue
Block a user