nuxt-community / redirect-module

No more cumbersome redirects for Nuxt 2!
MIT License
312 stars 17 forks source link

can i redirect with path list from api updated daily ? #94

Open tuananhbfs opened 3 years ago

tuananhbfs commented 3 years ago

I used this module to do redirection from 1 path list obtained via api. But it seems that the list is only established once during "build", is there a way for this list to update itself according to the API? Thank you!

griable commented 3 years ago

We are exactly encountering the same issue. Currently, we have to restart the server to get it updated which is far from ideal for our client. @tuananhbfs, did you find a workaround by any chance?

Thanks!

adnascent commented 3 years ago

I ran into a similar issue. I thought initially to use setInterval mutating the redirects array by reference, but no luck. Ended up just using a custom serverMiddleware with memory-cache module instead. Not sure if that's the best way or if I'm missing something.