mirror of
https://github.com/withastro/astro.git
synced 2025-03-10 23:01:26 -05:00
chore: move session to top-level config option (#13241)
* chore: add heading for session * move session to top-level config option --------- Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>
This commit is contained in:
parent
d79ee8cc27
commit
723c843971
1 changed files with 31 additions and 30 deletions
|
@ -554,6 +554,37 @@ export interface ViteUserConfig extends OriginalViteUserConfig {
|
|||
checkOrigin?: boolean;
|
||||
};
|
||||
|
||||
/**
|
||||
* @docs
|
||||
* @kind heading
|
||||
* @name session
|
||||
* @type {SessionConfig}
|
||||
* @version 5.3.0
|
||||
* @description
|
||||
*
|
||||
* Configures experimental session support by specifying a storage `driver` as well as any associated `options`.
|
||||
* You must enable the `experimental.session` flag to use this feature.
|
||||
* Some adapters may provide a default session driver, but you can override it with your own configuration.
|
||||
*
|
||||
* You can specify [any driver from Unstorage](https://unstorage.unjs.io/drivers) or provide a custom config which will override your adapter's default.
|
||||
*
|
||||
* See [the experimental session guide](https://docs.astro.build/en/reference/experimental-flags/sessions/) for more information.
|
||||
*
|
||||
* ```js title="astro.config.mjs"
|
||||
* {
|
||||
* session: {
|
||||
* // Required: the name of the Unstorage driver
|
||||
* driver: 'redis',
|
||||
* // The required options depend on the driver
|
||||
* options: {
|
||||
* url: process.env.REDIS_URL,
|
||||
* },
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
session?: SessionConfig<TSession>;
|
||||
|
||||
/**
|
||||
* @docs
|
||||
* @name vite
|
||||
|
@ -1724,36 +1755,6 @@ export interface ViteUserConfig extends OriginalViteUserConfig {
|
|||
validateSecrets?: boolean;
|
||||
};
|
||||
|
||||
/**
|
||||
* @docs
|
||||
* @name session
|
||||
* @type {SessionConfig}
|
||||
* @version 5.3.0
|
||||
* @description
|
||||
*
|
||||
* Configures experimental session support by specifying a storage `driver` as well as any associated `options`.
|
||||
* You must enable the `experimental.session` flag to use this feature.
|
||||
* Some adapters may provide a default session driver, but you can override it with your own configuration.
|
||||
*
|
||||
* You can specify [any driver from Unstorage](https://unstorage.unjs.io/drivers) or provide a custom config which will override your adapter's default.
|
||||
*
|
||||
* See [the experimental session guide](https://docs.astro.build/en/reference/experimental-flags/sessions/) for more information.
|
||||
*
|
||||
* ```js title="astro.config.mjs"
|
||||
* {
|
||||
* session: {
|
||||
* // Required: the name of the Unstorage driver
|
||||
* driver: 'redis',
|
||||
* // The required options depend on the driver
|
||||
* options: {
|
||||
* url: process.env.REDIS_URL,
|
||||
* },
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
session?: SessionConfig<TSession>;
|
||||
|
||||
/**
|
||||
*
|
||||
* @kind heading
|
||||
|
|
Loading…
Add table
Reference in a new issue