Closed kskrlinnorth2 closed 1 year ago
Inertia uses the History API, so cross-domain navigation wouldn't work anyway
The new URL must be of the same origin as the current URL; otherwise,
pushState()
will throw an exception. https://developer.mozilla.org/en-US/docs/Web/API/History/pushState
So only way is to use axios (or something similar) directly?
Hey! Thanks so much for your interest in Inertia.js and for sharing this issue/suggestion.
In an attempt to get on top of the issues and pull requests on this project I am going through all the older issues and PRs and closing them, as there's a decent chance that they have since been resolved or are simply not relevant any longer. My hope is that with a "clean slate" me and the other project maintainers will be able to better keep on top of issues and PRs moving forward.
Of course there's a chance that this issue is still relevant, and if that's the case feel free to simply submit a new issue. The only thing I ask is that you please include a super minimal reproduction of the issue as a Git repo. This makes it much easier for us to reproduce things on our end and ultimately fix it.
Really not trying to be dismissive here, I just need to find a way to get this project back into a state that I am able to maintain it. Hope that makes sense! ❤️
Versions:
@inertiajs/core
version: 0.11.1@inertiajs/vue3
version: 0.6.0Describe the problem:
Using Laravel with subdomain routing. Plan is to have single login route to which users can login from different subdomains. When using inertia form (useForm) this doesn't work, failing with 419 invalid csrf token.
When using axios everything works, but including plain axios along with inertia forms is another layer which would be good to avoid due the code maintenance and consistency.
Yes, I could duplicate login route for each subdomain (and all other shared routes), but that's not programming, just bad code.
Steps to reproduce:
Axios default setup
Example 1. Inertia form - not working 419 error
Example 2. Axios form - working 422 or 200 depends on data
How to make it work with Inertia since it's also using axios in the background?