IO-2060 Force no cache on LMS.
This commit is contained in:
@@ -15,7 +15,7 @@ import BillRequestValidator from "./bills/billRequestValidator";
|
||||
import cors from "cors";
|
||||
import helmet from "helmet";
|
||||
import responseTime from "response-time";
|
||||
|
||||
import nocache from "nocache";
|
||||
import {
|
||||
BillsMediaUploadMulter,
|
||||
BillsUploadMedia,
|
||||
@@ -107,6 +107,8 @@ if (process.env.NODE_ENV !== "production") {
|
||||
|
||||
const app: Express = express();
|
||||
const port = process.env.PORT;
|
||||
app.set("etag", false);
|
||||
app.use(nocache());
|
||||
app.use(bodyParser.json({ limit: "1000mb" }));
|
||||
app.use(bodyParser.urlencoded({ limit: "1000mb", extended: true }));
|
||||
app.use(responseTime());
|
||||
@@ -167,7 +169,10 @@ app.get(
|
||||
|
||||
InitServer();
|
||||
app.use(FolderPaths.StaticPath, express.static(FolderPaths.Root, {}));
|
||||
app.use("/assets", express.static("./assets", {}));
|
||||
app.use(
|
||||
"/assets",
|
||||
express.static("./assets", { etag: false, maxAge: 30 * 1000 })
|
||||
);
|
||||
app.listen(port, () => {
|
||||
logger.info(`ImEX Media Server is running at http://localhost:${port}`);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user