I am using client-side routing. When I'm on a page...
# kvision
r
I am using client-side routing. When I'm on a page like
<https://host/foo/bar>
Kvision RPCs go to
<https://host/foo/bar/kv/>...
instead of
<https://host/kv/>...
. Is there a way to configure kvision to use
/kv
(absolute) path rather than
kv
(relative)? Setting
<base href="/">
works but feels like overkill.
r
Yes. Add
<script>window["kv_remote_url_prefix"]="/";</script>
to your
index.html
before
main.bundle.js
.