Replies: 2 comments 1 reply
-
Now I'm thinking that adding a configuration option like |
Beta Was this translation helpful? Give feedback.
0 replies
-
The second parameter of the URL() constructor only applies when the You can use absolute URLs to bypass your issue? function hrefToUrl(href) {
return new URL(href.toString(), 'https://inertiajs.com')
}
hrefToUrl('routing'); // https://inertiajs.com/routing
hrefToUrl('https://github.com/inertiajs/inertia'); // https://github.com/inertiajs/inertia |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, Inertia always uses
window.location
as the base when constructing URLs (see here). I would like to make this configurable so that I can use Inertia in the context of a mobile app.The app is packaged with Capacitor and delivered through the app store. When the app launches, I make a mock Inertia request to my server to get the initial page object (instead of taking it from the
data-page
attribute of the#app
element). Now I would like to tell Inertia to make requests to my server instead of whateverwindow.location
is.Beta Was this translation helpful? Give feedback.
All reactions