Pass value from hooks to page.server.js #10611
              
  
  Closed
              
          
                  
                    
                      sharkstate
                    
                  
                
                  started this conversation in
                General
              
            Replies: 1 comment
-
| Ended up doing (hooks): event.locals.intl=event.request.headers.get('cf-ipcountry') (server): locals:{intl} | 
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
What is the cleanest way of passing variables from hooks to page.server.js? In hooks Im getting Cloudflare IP country through using event.request.headers.get('cf-ipcountry'), and want that to be picked up by page.server.js. Thank you
Beta Was this translation helpful? Give feedback.
All reactions