Skip to content

Commit

Permalink
Admin-Server: Prevent caching of index.html also for fallback (#281)
Browse files Browse the repository at this point in the history
Previously, the default cache-control header was used (public,
max-age=0), which can lead to caching in certain situations (see
https://stackoverflow.com/a/1383359/5562283)

---

<!-- Everything below this line will be removed from the commit message
when the PR is merged -->

## PR Checklist

- [ ] Link to the respective task if one exists: <!-- For instance,
COM-123 -->
- [ ] Provide screenshots/screencasts if the change contains visual
changes

<details>
    <summary>Screenshots/screencasts</summary>
    <!-- Insert screenshots/screencasts here -->
</details>
  • Loading branch information
dkarnutsch authored Jul 4, 2024
1 parent 59af6fc commit 7039c85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion admin/server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ app.use(

// As a fallback, route everything to index.html
app.get("*", (req, res) => {
res.sendFile(`index.html`, { root: `${__dirname}/../build/` });
res.sendFile(`index.html`, { root: `${__dirname}/../build/`, headers: { "cache-control": "no-store" } });
});

app.listen(port, () => {
Expand Down

0 comments on commit 7039c85

Please sign in to comment.