1
0
mirror of https://github.com/sasjs/server.git synced 2026-01-03 21:10:05 +00:00

fix(appstream): should serve only new files for same app stream name with new deployment

This commit is contained in:
Saad Jutt
2022-06-02 04:17:12 +05:00
parent a8ba378fd1
commit e6d1989847
5 changed files with 104 additions and 15 deletions

View File

@@ -0,0 +1,15 @@
import express from 'express'
import url from 'url'
export const getFullUrl = (req: express.Request) =>
url.format({
protocol: req.protocol,
host: req.get('host'),
pathname: req.originalUrl
})
export const getServerUrl = (req: express.Request) =>
url.format({
protocol: req.protocol,
host: req.get('x-forwarded-host') || req.get('host')
})

View File

@@ -10,6 +10,7 @@ export * from './generateRefreshToken'
export * from './getCertificates'
export * from './getDesktopFields'
export * from './getPreProgramVariables'
export * from './getServerUrl'
export * from './instantiateLogger'
export * from './isDebugOn'
export * from './parseLogToArray'