Skip to content

Support apps served from a subdirectory - #8

Merged
pascalbaljet merged 7 commits into
masterfrom
subdirectory-mount
Aug 6, 2026
Merged

Support apps served from a subdirectory#8
pascalbaljet merged 7 commits into
masterfrom
subdirectory-mount

Conversation

@pascalbaljet

Copy link
Copy Markdown
Member

The extension built the entry endpoint from the origin alone, so an app served from a subdirectory of its origin was requested at the wrong place and every entry was dropped. A Laravel app reached through a symlink in the document root lives at something like /portal, which puts the endpoint at /portal/_inertia/devtools/entries/{id} while the extension asked for /_inertia/devtools/entries/{id} and got a redirect.

The worker now takes the path from the recorder, either the x-inertia-devtools-base-path response header or the matching attribute on the injected id tag, and prefixes the endpoint with it. The extension never guesses the path, so this needs inertiajs/inertia-laravel#895 as well. Both values arrive from the inspected page, so the path is validated for shape and the built URL is compared against what was asked for, which rejects encoded dot segments that the URL parser would otherwise normalize out of the mount point.

Fixes #4.

@pascalbaljet
pascalbaljet merged commit 77a6166 into master Aug 6, 2026
6 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.

DevTools cannot fetch entries when the app is hosted under a subdirectory

1 participant