Nuxt/test/fixtures/with-config/middleware/user-agent.js
2017-10-28 22:42:51 +02:00

4 lines
133 B
JavaScript

export default function (context) {
context.userAgent = process.server ? context.req.headers['user-agent'] : navigator.userAgent
}