Skip to content

Commit

Permalink
Update react_static.md (#566)
Browse files Browse the repository at this point in the history
  • Loading branch information
rishi-raj-jain committed Nov 7, 2022
1 parent f9450ce commit 8c7d0ae
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions src/pages/guides/react_static.md
Expand Up @@ -61,18 +61,8 @@ export default new Router()
// Prevent search engine bot(s) from indexing
// Read more on: {{ DOCS_URL }}/guides/cookbook#blocking-search-engine-crawlers
.noIndexPermalink()
.static('dist', ({ cache }) => {
cache({
edge: {
maxAgeSeconds: 60 * 60 * 60 * 365,
forcePrivateCaching: true,
},
browser: {
maxAgeSeconds: 0,
serviceWorkerSeconds: 60 * 60 * 24,
},
})
})
// Create serveStatic route for each file in the folder dist with a cache-control header of 's-maxage=315360000'
.static('dist')
```

Refer to the [Routing](routing) guide for the full syntax of the `routes.js` file and how to configure it for your use case.
Expand Down

0 comments on commit 8c7d0ae

Please sign in to comment.