Merge pull request #3776 from bluewave-labs/chore/simplify-deployment
chore: simplify deployment
This commit is contained in:
98 files changed
+556
-2333
No files matched your search
@@ -52,6 +52,13 @@ export const createApp = ({
|
||||
|
||||
app.use(createStatusPageDocumentCsp(allowedOrigin));
|
||||
|
||||
// Client runtime config; registered before express.static so it shadows the
|
||||
// fallback config.js in the client build output
|
||||
const clientConfigScript = `window.__CHECKMATE_CONFIG__ = ${JSON.stringify(envSettings.clientConfig).replace(/</g, "\\u003c")};`;
|
||||
app.get("/config.js", (req, res) => {
|
||||
res.set("Cache-Control", "no-cache").type("application/javascript").send(clientConfigScript);
|
||||
});
|
||||
|
||||
app.use(express.static(frontendPath));
|
||||
|
||||
app.use("/api/v1/monitors/import/json", express.json({ limit: "10mb" }));
|
||||
|
||||
Reference in new issue
Block a user