Here’s my routes.ts config:
import { Router } from '@layer0/core/router'
import { starterRoutes } from '@layer0/starter'
import { CACHE_ASSETS, CACHE_PAGES } from './cache'
import shoppingFlowRouteHandler from './shoppingFlowRouteHandler'
const postCacheConfig = {
edge: {
maxAgeSeconds: 60 * 60 * 24,
staleWhileRevalidateSeconds: 60 * 60 * 24 * 365,
forcePrivateCaching: true,
},
browser: {
maxAgeSeconds: 0,
serviceWorkerSeconds: 60 * 60 * 24,
},
}
export default new Router()
// Service Worker and Browser.js
.use(starterRoutes)
// Partial Views
.match('/PartialViews/:path*', ({ cache, proxy }) => {
cache(CACHE_PAGES)
proxy('origin')
})
// Home page
.match('/', shoppingFlowRouteHandler)
.fallback(({ proxy }) => {
proxy('origin')
})
But on deployments, I see the following: