Nuxt/test/fixtures/with-config/middleware/user-agent.js

4 lines
133 B
JavaScript
Raw Normal View History

2017-02-09 23:45:49 +00:00
export default function (context) {
context.userAgent = process.server ? context.req.headers['user-agent'] : navigator.userAgent
2017-02-09 23:45:49 +00:00
}