SEO
This commit is contained in:
@@ -104,6 +104,8 @@ export async function app(): Promise<express.Express> {
|
||||
// All regular routes use the Angular engine
|
||||
server.get('*', async (req, res, next) => {
|
||||
console.log(`[SSR] Handling request: ${req.method} ${req.url}`);
|
||||
// Cache SSR-rendered pages at CDN level
|
||||
res.setHeader('Cache-Control', 'public, s-maxage=300, stale-while-revalidate=600');
|
||||
try {
|
||||
const response = await angularApp.handle(req);
|
||||
if (response) {
|
||||
|
||||
Reference in New Issue
Block a user