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

4 lines
135 B
JavaScript
Raw Normal View History

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