You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
see error trying to connect to 127.0.0.1:6379 instead of the url provided in config.
What is Expected?
Redis attempts to connect to url provided in config
What is actually happening?
Redis attempts to connect to the default url of 127.0.0.1:6379 because the storage options are not properly passed to unstorage's redis driver.
By adding console.log(opts) to node_modules/unstorage/drivers/redis.mjs it shows that the redis driver is reciving
Hey, I think that redis then can have a bit different interface for unstorage.
How it works currently is that with rate limiter you select a driver (memory, lru, redis, etc) and you pass options as a second parameter. These options are then passed to the unstorage driver.
So the thing is that we may need to add a condition there so that if the driver is redis, we need to spread the options instead of passing them as options
I'm not too sure, but shall we always spread options ?
Looks like the unstorage drivers always need this. lruCache looks like the only one for which options has a property name that is options - or am I mistaken here ?
Version
nuxt-security: V1.3.2
nuxt: v3.11.2
Steps to reproduce
npx nuxi@latest module add security
npm run dev
127.0.0.1:6379
instead of the url provided in config.What is Expected?
Redis attempts to connect to url provided in config
What is actually happening?
Redis attempts to connect to the default url of
127.0.0.1:6379
because the storage options are not properly passed to unstorage's redis driver.By adding
console.log(opts)
tonode_modules/unstorage/drivers/redis.mjs
it shows that the redis driver is recivingwhen it is expecting a structure like
I do not think this is an issue with unstorage since nuxt-session uses unstorage in a similar way and does not have this issue.
The text was updated successfully, but these errors were encountered: