Skip to content

Handle SSR URLs with trailing slashes #705

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

Merged
merged 2 commits into from
Apr 10, 2025
Merged

Conversation

simon-tma
Copy link
Contributor

If inertia.ssr.url ends with a /, then generated URL ends with //render which results in a 404 response from the SSR server which then causes a very confusing error message in Laravel (access to undefined index "head").

Instead, remove a trailing slash from the URL before appending /render.

@joetannenbaum
Copy link
Contributor

Looks good, thank you 👍

@joetannenbaum joetannenbaum merged commit 6276378 into inertiajs:2.x Apr 10, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants