nuxt-community / sitemap-module

Sitemap Module for Nuxt 2
https://sitemap.nuxtjs.org
MIT License
690 stars 128 forks source link

Support server request.headers context #216

Closed workingxx92 closed 3 years ago

workingxx92 commented 3 years ago

Hello, I need access req.headers.host before call.

const axios = require('axios')

{ sitemap: { routes: async () => { access req.headers.host at here const { data } = await axios.get('https://jsonplaceholder.typicode.com/users') return data.map((user) => /users/${user.username}) } } } Thank

workingxx92 commented 3 years ago

@danielroe . Can you help me? Thank

NicoPennec commented 3 years ago

@workingxx92 it's not possible, according the current cache system of the module.

NicoPennec commented 3 years ago

duplicate with #111