summaryrefslogtreecommitdiff
path: root/packages/integrations/cloudflare
diff options
context:
space:
mode:
authorGravatar Houston (Bot) <108291165+astrobot-houston@users.noreply.github.com> 2025-03-31 08:46:15 -0700
committerGravatar GitHub <noreply@github.com> 2025-03-31 16:46:15 +0100
commitddc98eb2add2836aef77541978629dcef6d712d6 (patch)
treebf05a3aeb1d4bb3154cb83489850618efd68b120 /packages/integrations/cloudflare
parentff9d69e3443c80059c54f6296d19f66bb068ead3 (diff)
downloadastro-@astrojs/alpinejs@0.4.5.tar.gz
astro-@astrojs/alpinejs@0.4.5.tar.zst
astro-@astrojs/alpinejs@0.4.5.zip
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'packages/integrations/cloudflare')
-rw-r--r--packages/integrations/cloudflare/CHANGELOG.md57
-rw-r--r--packages/integrations/cloudflare/package.json2
2 files changed, 58 insertions, 1 deletions
diff --git a/packages/integrations/cloudflare/CHANGELOG.md b/packages/integrations/cloudflare/CHANGELOG.md
index 4e90a3dbe..338142237 100644
--- a/packages/integrations/cloudflare/CHANGELOG.md
+++ b/packages/integrations/cloudflare/CHANGELOG.md
@@ -1,5 +1,62 @@
# @astrojs/cloudflare
+## 12.4.0
+
+### Minor Changes
+
+- [#13514](https://github.com/withastro/astro/pull/13514) [`a9aafec`](https://github.com/withastro/astro/commit/a9aafec47a4d8a92c826663dca2f9850643651ec) Thanks [@ascorbic](https://github.com/ascorbic)! - Automatically configures Cloudflare KV storage when experimental sessions are enabled
+
+ If the `experimental.session` flag is enabled when using the Cloudflare adapter, Astro will automatically configure the session storage using the Cloudflare KV driver. You can still manually configure the session storage if you need to use a different driver or want to customize the session storage configuration. If you want to use sessions, you will need to create the KV namespace and declare it in your wrangler config. You can do this using the Wrangler CLI:
+
+ ```sh
+ npx wrangler kv namespace create SESSION
+ ```
+
+ This will log the id of the created namespace. You can then add it to your `wrangler.json`/`wrangler.toml` file like this:
+
+ ```jsonc
+ // wrangler.json
+ {
+ "kv_namespaces": [
+ {
+ "binding": "SESSION",
+ "id": "<your kv namespace id here>",
+ },
+ ],
+ }
+ ```
+
+ By default it uses the binding name `SESSION`, but if you want to use a different binding name you can do so by passing the `sessionKVBindingName` option to the adapter. For example:
+
+ ```js
+ import { defineConfig } from 'astro/config';
+ import cloudflare from '@astrojs/cloudflare';
+ export default defineConfig({
+ output: 'server',
+ site: `http://example.com`,
+ adapter: cloudflare({
+ platformProxy: {
+ enabled: true,
+ },
+ sessionKVBindingName: 'MY_SESSION',
+ }),
+ experimental: {
+ session: true,
+ },
+ });
+ ```
+
+ See [the Cloudflare KV docs](https://developers.cloudflare.com/kv/concepts/kv-namespaces/) for more details on setting up KV namespaces.
+
+ See [the experimental session docs](https://docs.astro.build/en/reference/experimental-flags/sessions/) for more information on configuring session storage.
+
+### Patch Changes
+
+- [#13526](https://github.com/withastro/astro/pull/13526) [`ff9d69e`](https://github.com/withastro/astro/commit/ff9d69e3443c80059c54f6296d19f66bb068ead3) Thanks [@jsparkdev](https://github.com/jsparkdev)! - update `vite` to the latest version
+
+- Updated dependencies []:
+ - @astrojs/underscore-redirects@0.6.0
+
## 12.3.1
### Patch Changes
diff --git a/packages/integrations/cloudflare/package.json b/packages/integrations/cloudflare/package.json
index fcc51d44b..dc83e662e 100644
--- a/packages/integrations/cloudflare/package.json
+++ b/packages/integrations/cloudflare/package.json
@@ -1,7 +1,7 @@
{
"name": "@astrojs/cloudflare",
"description": "Deploy your site to Cloudflare Workers/Pages",
- "version": "12.3.1",
+ "version": "12.4.0",
"type": "module",
"types": "./dist/index.d.ts",
"author": "withastro",