Static GitHub Issues

[88] Access to the request in default.vue file

prev: Err while using WeUI.js
next: Global JavaScript

Hi!

I'm currently working on a project with Nuxt as an Express Middleware with i18next support. My problem is that I need to access the user browser language, I suppose via the req object SSR.

There is a way to access the request in the layouts/default.vue ? Or in a plugin/customPlugin.js file ? I know that we can access req object in pages vue files but no in layouts templates.

If you have any idea, you're welcome :)

Thanks :+1:

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c70">#c70</a>)</em></sub></div>