dee_gg
dee_gg
NNuxt
Created by dee_gg on 10/7/2024 in #❓・help
Using ISR with Nuxthub / Cloudflare pages
Hi! I'd love to setup my website to use ISR and have a webhook revalidate / rebuild pages only on demand when the CMS updates the content. That I think is not too much complicated for me, but before embarking on my journey, I'd just like to know if it's even feasable? I feel like I've only seen the Vercel preset mentioning it and I can't find any information about being able to do that on Cloudflare pages. Thanks!
1 replies
NNuxt
Created by dee_gg on 9/23/2024 in #❓・help
Bypass Nuxt and serve other server's response (proxy?) for a sitemap.xml?
Hi! I'm building a website with Craft CMS as a headless CMS and Nuxt in front of it. Craft has a great SEO plugin called SEOMatic and it does everything we need it to do. I've been able to feed the metadata by fetching it through our graphql api, no problem there, but the sitemap.xml is generated already and fully properly configured so I'd like to serve it directly instead of consuming it in Nuxt and then re-serving it barely changed. Is this what routeRules with the proxy param should be helping me with? I'm confused because I can't get it to work, but maybe a proxy isn't the best solution either. I'd love to hear from anyone who's configured Nuxt to just pass the request on to another server (proxy?) https://nitro.unjs.io/guide/routing#route-rules Here's a simple version of my non working config so far:
export default defineNuxtConfig({
nitro: {
preset: 'cloudflare-pages',
},

routeRules: {
'*.xml': {proxy: 'https://admin.geloso.com'}
},
});
export default defineNuxtConfig({
nitro: {
preset: 'cloudflare-pages',
},

routeRules: {
'*.xml': {proxy: 'https://admin.geloso.com'}
},
});
6 replies