ngx-cloudflare 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +49 -0
- package/README.md +2 -0
- package/package.json +1 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to the `ngx-cloudflare` package. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the project uses [Semantic Versioning](https://semver.org/). Until 1.0.0, a minor version may rename or remove public functions.
|
|
4
|
+
|
|
5
|
+
## [Unreleased]
|
|
6
|
+
|
|
7
|
+
## [0.2.2] - 2026-11-12
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- `CHANGELOG.md`, also shipped in the npm package.
|
|
12
|
+
- The ngx-cloudflare logo at the top of the README.
|
|
13
|
+
|
|
14
|
+
## [0.2.1] - 2026-11-11
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- README: the note now says this is an early 0.x release instead of "not on npm yet".
|
|
19
|
+
|
|
20
|
+
## [0.2.0] - 2026-11-11
|
|
21
|
+
|
|
22
|
+
First public release.
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
|
|
26
|
+
- `ngx-cloudflare/server`:
|
|
27
|
+
- `createCloudflareRequestHandler(options?)`, the Worker `fetch` handler for Angular SSR. It passes `env`, `ctx` and `request.cf` to Angular, and fills them in under `ng serve` through wrangler's platform proxy.
|
|
28
|
+
- A hostname allow-list that works on Workers: `localhost`, `127.0.0.1`, `*.workers.dev`, `allowedHosts` from code and the `ALLOWED_HOSTS` var. Other hosts get a 400 that says where to add them.
|
|
29
|
+
- An `api` option for requests under `/api/`, and `dispatch`, which answers them in-process (falling back to the `ASSETS` binding) instead of a network self-fetch that Cloudflare rejects with error 1042.
|
|
30
|
+
- Removal of `forwarded` and `x-forwarded-*` headers before Angular sees them.
|
|
31
|
+
- `createCloudflareFetch` and helpers: `resolveAllowedHosts`, `isHostAllowed`, `stripProxyHeaders`, `isCloudflareContext`, `hostsFromEnv`, `toApiHandler`, `callInProcess`, `isInProcessRequest`.
|
|
32
|
+
- `ngx-cloudflare`:
|
|
33
|
+
- `injectCloudflare`, `injectEnv`, `injectExecutionContext` and `injectRequestCf`, each with `{ required: true }`.
|
|
34
|
+
- `provideCloudflare()`, which answers same-origin `HttpClient` calls in-process during rendering while keeping Angular's transfer cache working.
|
|
35
|
+
- `ngx-cloudflare/testing`: `provideCloudflareTesting`, `createCloudflareTestContext` and `createTestExecutionContext` for TestBed.
|
|
36
|
+
- `ng add ngx-cloudflare` for apps made by `ng new --ssr`, `npm create cloudflare` and `wrangler setup`:
|
|
37
|
+
- sets the build to `outputMode: server` and the neutral SSR platform, and keeps `wrangler` out of the bundle
|
|
38
|
+
- replaces a stock `src/server.ts`
|
|
39
|
+
- copies wrangler route hosts into `ALLOWED_HOSTS`
|
|
40
|
+
- creates or repairs `wrangler.jsonc`
|
|
41
|
+
- switches the stock prerender route to server rendering
|
|
42
|
+
- converts Angular 19 apps without server routing
|
|
43
|
+
- adds `preview`, `deploy` and `cf-typegen` scripts
|
|
44
|
+
- Support for Angular 19 to 22.
|
|
45
|
+
|
|
46
|
+
[Unreleased]: https://github.com/erkamyaman/ngx-cloudflare/compare/1feab4d...HEAD
|
|
47
|
+
[0.2.2]: https://www.npmjs.com/package/ngx-cloudflare/v/0.2.2
|
|
48
|
+
[0.2.1]: https://www.npmjs.com/package/ngx-cloudflare/v/0.2.1
|
|
49
|
+
[0.2.0]: https://www.npmjs.com/package/ngx-cloudflare/v/0.2.0
|
package/README.md
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
<p align="center"><img src="https://raw.githubusercontent.com/erkamyaman/ngx-cloudflare/main/docs/logo/ngx-cloudflare-logo.svg" width="96" height="96" alt="" /></p>
|
|
1
2
|
<h1 align="center">ngx-cloudflare</h1>
|
|
2
3
|
<p align="center">
|
|
3
4
|
<img src="https://img.shields.io/maintenance/yes/2026?style=for-the-badge" alt="Maintained: yes" />
|
|
@@ -16,6 +17,7 @@ Workers bindings, a working hostname allow-list and in-process API calls for Ang
|
|
|
16
17
|
<td align="center"><a href="https://github.com/erkamyaman/ngx-cloudflare/blob/main/docs/api.md"><strong>API</strong></a></td>
|
|
17
18
|
<td align="center"><a href="https://github.com/erkamyaman/ngx-cloudflare/blob/main/docs/recipes.md">Recipes</a></td>
|
|
18
19
|
<td align="center"><a href="https://github.com/erkamyaman/ngx-cloudflare/blob/main/docs/troubleshooting.md">Troubleshooting</a></td>
|
|
20
|
+
<td align="center"><a href="https://github.com/erkamyaman/ngx-cloudflare/blob/main/CHANGELOG.md">Changelog</a></td>
|
|
19
21
|
<td align="center"><a href="#the-demo">Demo</a></td>
|
|
20
22
|
</tr>
|
|
21
23
|
</table>
|