summaryrefslogtreecommitdiff
path: root/packages/integrations/cloudflare
diff options
context:
space:
mode:
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",