Fix three critical issues: Docker healthcheck, USD->EUR pricing, static asset caching
Some checks failed
Deploy to Production / Deploy to Server (push) Failing after 22s
Some checks failed
Deploy to Production / Deploy to Server (push) Failing after 22s
- Docker healthcheck: Use Node.js instead of curl (not installed in slim image) - Pricing: Change from USD ($) to EUR (€) in frontend and backend Stripe integration - Static assets: Add Cache-Control headers (1 day) for /public and /docs files
This commit is contained in:
parent
76714d799e
commit
03dd6c17df
4 changed files with 46 additions and 6 deletions
|
|
@ -172,10 +172,17 @@ ${apiKey ? `
|
|||
|
||||
// Landing page
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
app.use(express.static(path.join(__dirname, "../public"), { maxAge: "1h", etag: true }));
|
||||
app.use(express.static(path.join(__dirname, "../public"), {
|
||||
maxAge: "1d",
|
||||
etag: true,
|
||||
setHeaders: (res) => {
|
||||
res.setHeader('Cache-Control', 'public, max-age=86400');
|
||||
}
|
||||
}));
|
||||
|
||||
// Docs page (clean URL)
|
||||
app.get("/docs", (_req, res) => {
|
||||
res.setHeader('Cache-Control', 'public, max-age=86400');
|
||||
res.sendFile(path.join(__dirname, "../public/docs.html"));
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue