-
-
Notifications
You must be signed in to change notification settings - Fork 234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
All responses are 409 #76
Comments
Yes, this is caused by asset versioning. A 409 response is sent when your assets are out of date. You can use this to force an asset update, which is really helpful! |
Does this happen automatically or will I need to include Inertia::version(function () {
return md5_file(public_path('mix-manifest.json'));
}); in my AppServiceProvider? This behavior has started relatively recently when it had been working fine. This behavior is good when it's needed, I just don't know why it has started suddenly. |
No, it doesn't happen automatically. It should only happen if you're using |
Actually I just realized I had it already. Removing it solves my issue 🤷♂️ |
Okay cool. I would recommend not removing it, as this is very helpful behaviour if you're using code splitting. |
Yes absolutely. I just figured out what is happening. I've extended Inertia to support API resources (#70), and the middleware isn't using my class, therefore not my version! Adding in the additional Thanks so much Jonathan! |
@reinink I have a similar issue but it keeps refreshing every time. What do I do to bring these assets up-to-date? |
i have similar your issue as well but i have solved it by modifying this code line at HandleInertiaRequests.php file |
For me this was an issue with the fact that we have a load balancer in place. Using sticky sessions resolved it for us. |
Use @inertiajs/inertia-vue3 instead of @inertiajs/vue3 |
I had the same issue for a while, so I wanted to share my approach for any future readers: if you use any Vue specific handlers such as @click="selectSortOption(option)", this will cause a full page refresh as it is not in line with inertias asset versioning. Save yourself some troubles and read the Inertia docs, use < Link > and Inertia native navigation if you want to avoid frequent issues with 409s. |
Not an issue, more of a question.
I am getting 409 responses when using
<inertia-link>
. The page then reloads the intended url and is working fine, due to this behavior.Any idea what could be causing this? When visiting directly/testing everything is 200. I feel like there's a conflicting header?
Here are the headers according to Telescope:
The response in Telescope just says
"HTML Response"
.The text was updated successfully, but these errors were encountered: