File tree Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change 11{
22  "name" : " @thecodeorigin/nuxt" 
33  "type" : " module" 
4-   "version" : " 2.7.3 " 
4+   "version" : " 2.7.4 " 
55  "publishConfig" : {
66    "registry" : " https://registry.npmjs.org" 
77    "access" : " public" 
Original file line number Diff line number Diff line change @@ -3,12 +3,16 @@ import type { H3Event } from 'h3'
33const  EXCLUDED_PATHS  =  [ '/api/health' ] 
44
55export  default  defineNitroPlugin ( async  ( nitroApp )  =>  { 
6-   // Create a request logger function 
7-   const  logRequest  =  logger . createRequestLogger ( ) 
6+   const  bucket  =  process . env . AWS_LOGGER_S3_BUCKET 
7+   const  region  =  process . env . AWS_LOGGER_S3_REGION 
8+   if  ( bucket  &&  region )  { 
9+     // Create a request logger function 
10+     const  logRequest  =  logger . createRequestLogger ( ) 
811
9-   // Hook into each request 
10-   nitroApp . hooks . hook ( 'request' ,  async  ( event : H3Event )  =>  { 
11-     if  ( ! EXCLUDED_PATHS . includes ( event . path ) ) 
12-       await  logRequest ( event ) 
13-   } ) 
12+     // Hook into each request 
13+     nitroApp . hooks . hook ( 'request' ,  async  ( event : H3Event )  =>  { 
14+       if  ( ! EXCLUDED_PATHS . includes ( event . path ) ) 
15+         await  logRequest ( event ) 
16+     } ) 
17+   } 
1418} ) 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments