1
0
mirror of https://github.com/sasjs/server.git synced 2025-12-11 03:34:35 +00:00

fix(upload): appStream uses CSRF + Session authentication

This commit is contained in:
Saad Jutt
2022-05-02 18:01:28 +05:00
parent a07f47a1ba
commit 1f89279264
10 changed files with 78 additions and 74 deletions

View File

@@ -7,9 +7,11 @@ import { appStreamHtml } from './appStreamHtml'
const router = express.Router()
router.get('/', async (_, res) => {
router.get('/', async (req, res) => {
const content = appStreamHtml(process.appStreamConfig)
res.cookie('XSRF-TOKEN', req.csrfToken())
return res.send(content)
})