1
0
mirror of https://github.com/sasjs/server.git synced 2026-04-09 23:23:13 +00:00

fix(stp): return plain/text header for GET & debug

This commit is contained in:
Saad Jutt
2022-03-14 04:42:30 +05:00
parent 698180ab7e
commit 145ac45036
4 changed files with 23 additions and 7 deletions

View File

@@ -4,6 +4,7 @@ export * from './file'
export * from './generateAccessToken'
export * from './generateAuthCode'
export * from './generateRefreshToken'
export * from './isDebugOn'
export * from './getCertificates'
export * from './getDesktopFields'
export * from './parseLogToArray'

View File

@@ -0,0 +1,8 @@
import { ExecutionVars } from '../controllers/internal'
export const isDebugOn = (vars: ExecutionVars) => {
const debugValue =
typeof vars._debug === 'string' ? parseInt(vars._debug) : vars._debug
return !!(debugValue && debugValue >= 131)
}