Skip to content

Commit bef059c

Browse files
authored
Merge branch 'main' into renovate/major-netlify-packages
2 parents e21bf3f + df8b732 commit bef059c

File tree

7 files changed

+2817
-1394
lines changed

7 files changed

+2817
-1394
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,17 @@ export async function netlifyCommonEngineHandler(request: Request, context: any)
162162
}
163163
```
164164

165+
### Caching responses from SSR
166+
167+
The Angular Runtime's edge functions are automatically configured with `cache: "manual"`.
168+
This means Netlify will honor Cache Control headers from your SSR responses.
169+
170+
You can use [Angular's server routes](https://angular.dev/guide/ssr#setting-headers-and-status-codes) to control headers in your responses or [customize request handling manually](#customizing-request-handling).
171+
172+
To learn more read Netlify's docs on:
173+
- [Caching] (https://docs.netlify.com/platform/caching/),
174+
- [When to use caching](https://docs.netlify.com/edge-functions/optional-configuration/#when-to-use-caching).
175+
165176
### Limitations
166177

167178
The [`server.ts` file](https://angular.dev/guide/ssr#configure-server-side-rendering) that's part of the Angular scaffolding is meant for deploying to a VM, and is not compatible with this Netlify build plugin for Angular@17 and Angular@18. If you applied changes to that file, you'll need to replicate them in an Edge Function. See (#135)[https://github.com/netlify/angular-runtime/issues/135] for an example.

demo/package-lock.json

Lines changed: 1167 additions & 314 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/helpers/setUpEdgeFunction.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ const setUpEdgeFunction = async ({ outputPath, constants, failBuild, usedEngine
246246
excludedPath: ${JSON.stringify(excludedPaths)},
247247
generator: "${packageJson.name}@${packageJson.version}",
248248
name: "Angular SSR",
249+
cache: "manual",
249250
};
250251
`
251252

tests/fixtures/angular-20-zoneless/package-lock.json

Lines changed: 768 additions & 416 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/fixtures/angular-20/package-lock.json

Lines changed: 768 additions & 416 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/fixtures/nx-angular-19-app-engine/package-lock.json

Lines changed: 51 additions & 124 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)