https://kotlinlang.org logo
#kvision
Title
# kvision
r

rocketraman

02/05/2022, 4:49 AM
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

Robert Jaros

02/05/2022, 6:18 AM
Yes. Add
<script>window["kv_remote_url_prefix"]="/";</script>
to your
index.html
before
main.bundle.js
.
5 Views