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

fix: default content-type for sas programs should be text/plain

This commit is contained in:
2022-09-20 02:32:22 +05:00
parent 5c0eff5197
commit 9977c9d161

View File

@@ -92,6 +92,9 @@ export class SASSessionController extends SessionController {
path: sessionFolder
}
const headersPath = path.join(session.path, 'stpsrv_header.txt')
await createFile(headersPath, 'Content-type: text/plain')
// we do not want to leave sessions running forever
// we clean them up after a predefined period, if unused
this.scheduleSessionDestroy(session)
@@ -170,7 +173,7 @@ ${autoExecContent}`
session.ready = true
}
public async deleteSession(session: Session) {
private async deleteSession(session: Session) {
// remove the temporary files, to avoid buildup
await deleteFolder(session.path)