a-luna / fastapi-redis-cache

A simple and robust caching solution for FastAPI that interprets request header values and creates proper response header values (powered by Redis)
MIT License
152 stars 24 forks source link

Add support for authentication to a remote redis #68

Open E-wave112 opened 2 years ago

E-wave112 commented 2 years ago

Hello,

I am trying to connect my fastapi application to a redis server instance hosted on redis_labs and it requires me to provide my credentials(username and password) before i can connect to the server. unfortunately i can't find a way to provide my credentials when instantiating the FastApiRedisCache() class.

Is there a walkaround to this?

jameswinegar commented 2 years ago

@E-wave112 you can pass it in the connection URI.

https://stackoverflow.com/questions/44344628/how-to-create-a-redis-cloud-connection-url-with-an-auth-password

E-wave112 commented 2 years ago

Thank you @jameswinegar i will be sure to try the options out and let you know of the outcome!