mirror of
https://github.com/sasjs/server.git
synced 2026-01-12 08:40:04 +00:00
feat(certs): ENV variables updated and set CA Root for HTTPS server
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import path from 'path'
|
||||
import fs from 'fs'
|
||||
import {
|
||||
SASSessionController,
|
||||
JSSessionController,
|
||||
getSASSessionController,
|
||||
getJSSessionController,
|
||||
processProgram
|
||||
@@ -76,10 +78,19 @@ export class ExecutionController {
|
||||
session: sessionByFileUpload,
|
||||
runTime
|
||||
}: ExecuteProgramParams): Promise<ExecuteReturnRaw | ExecuteReturnJson> {
|
||||
const sessionController =
|
||||
runTime === RunTimeType.SAS
|
||||
? getSASSessionController()
|
||||
: getJSSessionController()
|
||||
let sessionController: SASSessionController | JSSessionController
|
||||
|
||||
switch (runTime) {
|
||||
case RunTimeType.SAS:
|
||||
sessionController = getSASSessionController()
|
||||
break
|
||||
case RunTimeType.JS:
|
||||
sessionController = getJSSessionController()
|
||||
break
|
||||
|
||||
default:
|
||||
throw new Error('No Runtime is configured1')
|
||||
}
|
||||
|
||||
const session =
|
||||
sessionByFileUpload ?? (await sessionController.getSession())
|
||||
|
||||
Reference in New Issue
Block a user