1
0
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:
2022-09-07 18:48:56 +02:00
parent 70655e74d3
commit 06d3b17154
5 changed files with 106 additions and 58 deletions

View File

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