@@ -98,10 +98,6 @@ export default defineNuxtConfig({
9898        authorization : Boolean ( process . env . FEATURE_AUTHORIZATION ) , 
9999      } , 
100100
101-       hotjar : { 
102-         projectId : process . env . HOTJAR_ID , 
103-       } , 
104- 
105101      theme : { 
106102        appLogo : process . env . NUXT_PUBLIC_APP_LOGO  ||  '/images/logo.svg' , 
107103        appName : process . env . NUXT_PUBLIC_APP_NAME  ||  'nuxt-template' , 
@@ -284,7 +280,6 @@ export default defineNuxtConfig({
284280    'nuxt-security' , 
285281    'nuxt-vuefire' , 
286282    'nuxt-gtag' , 
287-     'nuxt-module-hotjar' , 
288283    'nuxt-nodemailer' , 
289284  ] , 
290285
@@ -310,12 +305,6 @@ export default defineNuxtConfig({
310305    ] , 
311306  } , 
312307
313-   hotjar : { 
314-     hotjarId : process . env . HOTJAR_ID , 
315-     scriptVersion : 6 , 
316-     debug : process . env . NODE_ENV  ===  'development' , 
317-   } , 
318- 
319308  nodemailer : process . env . NODE_ENV  ===  'development' 
320309    ? { 
321310        from : process . env . SMTP_FROM , 
@@ -349,16 +338,24 @@ export default defineNuxtConfig({
349338      } , 
350339    } , 
351340    hidePoweredBy : true , 
352-     rateLimiter : { 
353-       driver : { 
354-         name : 'redis' , 
355-         options : { 
356-           host : process . env . REDIS_HOST , 
357-           port : Number ( process . env . REDIS_PORT ) , 
358-           password : process . env . REDIS_PASSWORD , 
359-         } , 
360-       } , 
361-     } , 
341+     rateLimiter : process . env . UPSTASH_REDIS_REST_URL  &&  process . env . UPSTASH_REDIS_REST_TOKEN 
342+       ? { 
343+           driver : { 
344+             name : 'upstash' , 
345+           } , 
346+         } 
347+       : process . env . REDIS_HOST  &&  process . env . REDIS_PASSWORD 
348+         ? { 
349+             driver : { 
350+               name : 'redis' , 
351+               options : { 
352+                 host : process . env . REDIS_HOST , 
353+                 port : Number ( process . env . REDIS_PORT ) , 
354+                 password : process . env . REDIS_PASSWORD , 
355+               } , 
356+             } , 
357+           } 
358+         : false , 
362359  } , 
363360
364361  compatibilityDate : '2024-07-12' , 
0 commit comments