You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, what if we wanted to display the content of foo.vue and show /bar in the browser url?
I have tried the proxyRequest(event, target) h3 util function which shows in the network tab that /bar is hit and /foo is returned, but the browser url updates to foo instead of remaining bar
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Given the following folder structure
How can a rewrite be returned from
index.js
?Here is a link to a live example on stackblitz
This code works just fine, when a user visits
/bar
they are sent to/foo
and the browser url updates accordingly.However, what if we wanted to display the content of
foo.vue
and show/bar
in the browser url?I have tried the
proxyRequest(event, target)
h3 util function which shows in the network tab that/bar
is hit and/foo
is returned, but the browser url updates tofoo
instead of remainingbar
Beta Was this translation helpful? Give feedback.
All reactions