mirror of
https://github.com/sasjs/server.git
synced 2026-01-03 21:10:05 +00:00
feat: sas9 mocker improved - public access denied scenario
This commit is contained in:
@@ -3,6 +3,7 @@ import express, { ErrorRequestHandler } from 'express'
|
||||
import csrf, { CookieOptions } from 'csurf'
|
||||
import cookieParser from 'cookie-parser'
|
||||
import dotenv from 'dotenv'
|
||||
import bodyParser from 'body-parser'
|
||||
|
||||
import {
|
||||
copySASjsCore,
|
||||
@@ -77,6 +78,15 @@ export default setProcessVariables().then(async () => {
|
||||
app.use(express.json({ limit: '100mb' }))
|
||||
app.use(express.static(path.join(__dirname, '../public')))
|
||||
|
||||
// Body parser is used for decoding the formdata on POST request.
|
||||
// Currently only place we use it is SAS9 Mock - POST /SASLogon/login
|
||||
app.use(
|
||||
bodyParser.urlencoded({
|
||||
extended: true
|
||||
})
|
||||
)
|
||||
app.use(bodyParser.json())
|
||||
|
||||
await setupFolders()
|
||||
await copySASjsCore()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user