NuxtN
Nuxt10mo ago
6 replies
Bread

How to handle relative anchor links when the destination is external?

I am using an external CMS and it has some confiurable CTAS (and rich text).

How can I get those relative URLS (which I can not change to be absolute) to proxy through to my CMS backend instead of hitting [..path].vue.

I have a working example here:

https://stackblitz.com/edit/github-5cmnvyxf?file=pages%2Findex.vue

and setting up a route-proxy in /server/middleware makes this work on serverside completely fine - but navigating client-side does not (until refreshing, hitting server side).
StackBlitzSean Thorne
Create a new Nuxt project, module, layer or start from a theme with our collection of starters.
Nuxt - Starter - StackBlitz
Was this page helpful?