Nuxt/test/fixtures/custom-dirs/custom-middleware/user-agent.js

4 lines
133 B
JavaScript
Raw Normal View History

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