-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11547 from remix-run/brophdawg11/prerender-serve
Update remix-serve static serving for prerendering
- Loading branch information
Showing
2 changed files
with
20 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
"@react-router/serve": patch | ||
--- | ||
|
||
Update `express.static` configurations to support prerendering | ||
|
||
- Assets in the `build/client/assets` folder are served as before, with a 1-year immutable `Cache-Control` header | ||
- Static files outside of assets, such as pre-rendered `.html` and `.data` files are not served with a specific `Cache-Control` header | ||
- `.data` files are served with `Content-Type: text/x-turbo` | ||
- For some reason, when adding this via `express.static`, it seems to also add a `Cache-Control: public, max-age=0` to `.data` files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters