Currently the sessions driver config is really tied to unstorage. The goal of this task is to introduce a new way to provide drivers, not unstorage specific:
-import { defineConfig } from 'astro/config'
+import { defineConfig, sessionDrivers } from 'astro/config'
export default defineConfig({
session: {
- driver: 'redis',
- options: {
- url: process.env.REDIS_URL
- },
+ driver: sessionDrivers.redis({
+ url: process.env.REDIS_URL
+ }),
}
})
This would remain backward compatible in v6 by simply deprecating options and driver as strings.
Currently the sessions driver config is really tied to unstorage. The goal of this task is to introduce a new way to provide drivers, not unstorage specific:
This would remain backward compatible in v6 by simply deprecating
optionsanddriveras strings.