You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: autogenerate default allowedHosts and trustProxyHeaders (#427)
* update deps, apply prettier, change to ESM, update tests
* update ci tests to use Node 22
* coderabbit 1
* remove exclude
* update lockfiles
* lint fixes
* fix prettier config
* fix npm ci
* coderabbit 2
* downgrade and pin angular
* update engine version range to match Angular
* fix version and readme
* update readme to suggest latest CLI
* add allowedHosts and trustedProxyHeaders
* regenrate lockfiles
* fix type for getContext
* update readme for deploy instructions
* prevent missing env vars from failing build
* fix for loop bug
* update swapped file templates
* fix context potentially being undefined
* consolidate app-engine exports in a single file
* conditionally update Angular config
* revert pathname to request
* fix typo
* fix merge conflicts
* match version of angular/ssr instead of core
* Update README.md
Co-authored-by: Michal Piechowiak <misiek.piechowiak@gmail.com>
* seperate version detection for angular/core and ssr
* update tests
* update failBuild message and remove dead code
* update readme
---------
Co-authored-by: Michal Piechowiak <misiek.piechowiak@gmail.com>
Copy file name to clipboardExpand all lines: README.md
+17-11Lines changed: 17 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ If you are using Server-Side Rendering you will need to install Angular Runtime
39
39
40
40
### Manual Installation
41
41
42
-
If you need to pin this plugin to a specific version or if you are using Server-Side Rendering with Angular 19 or Angular 20, you will need to install the plugin manually.
42
+
If you need to pin this plugin to a specific version or if you are using Server-Side Rendering with Angular 19+, you will need to install the plugin manually.
43
43
44
44
Install it via your package manager:
45
45
@@ -108,26 +108,29 @@ Note that App Engine in Angular 19 is in Developer Preview and requires explicit
108
108
109
109
Starting with Angular@19. The build plugin makes use of the `server.ts` file to handle requests. The default Angular scaffolding generates incompatible code for Netlify so the build plugin will swap it for compatible `server.ts` file automatically if it detects default version being used.
110
110
111
-
Make sure you have `@netlify/angular-runtime` version 2.2.0 or later installed in your project. Netlify compatible `server.ts` file imports utilities from this package and Angular Compiler need to be able to resolve it and it can only do that if it's installed in your project and not when it's auto-installed by Netlify.
111
+
Make sure you have `@netlify/angular-runtime` version 4.0.0 or later installed in your project. Netlify compatible `server.ts` file imports utilities from this package and Angular Compiler need to be able to resolve it and it can only do that if it's installed in your project and not when it's auto-installed by Netlify.
112
112
113
113
### Customizing request handling
114
114
115
115
If you need to customize the request handling, you can do so by copying one of code snippets below to your `server.ts` file.
116
116
117
-
If you are using Angular 20 or Angular 19 with App Engine Developer Preview:
117
+
If you are using `@angular/ssr@21.2.9+`with AppEngine:
// const pathname = new URL(request.url).pathname;
164
+
// const pathname = new URL(request.url).pathname
157
165
// if (pathname === '/api/hello') {
158
166
// return Response.json({ message: 'Hello from the API' });
159
167
// }
@@ -181,9 +189,7 @@ The [`server.ts` file](https://angular.dev/guide/ssr#configure-server-side-rende
181
189
182
190
### Requirements
183
191
184
-
To use the Angular Runtime while building and deploying with the CLI, you need to have `netlify-cli v26.0.0` installed (or a later version).
185
-
186
-
Please also make sure to use `ntl deploy --build` (rather than `ntl build && ntl deploy`).
192
+
To use the Angular Runtime while building and deploying with the CLI, you need to have `netlify-cli v26.0.0` installed (or a later version). To deploy the site via CLI, please use `netlify deploy`. Using `netlify deploy` with the `--no-build` flag is not supported.
0 commit comments