Skip to content

Add --router option to jigsaw serve#784

Merged
damiani merged 1 commit into
mainfrom
nd/serve-custom-router
May 1, 2026
Merged

Add --router option to jigsaw serve#784
damiani merged 1 commit into
mainfrom
nd/serve-custom-router

Conversation

@nicodevs

@nicodevs nicodevs commented May 1, 2026

Copy link
Copy Markdown
Contributor

Closes #750

Issue

jigsaw serve uses PHP’s built-in server. As noted in the issue, when the directory contains a dot, it incorrectly interprets such paths as file requests. This can be bypassed by adding a --router parameter to the php -S command, but Jigsaw does not support it.

Note: the issue was fixed in PHP 8.4 (check notes here) - but I think it's worth addressing given Jigsaw also supports 8.2 and 8.3

Solution

This PR adds support for an optional --router flag. If present, it is passed to the php -S invocation.

@nicodevs nicodevs self-assigned this May 1, 2026
@damiani damiani merged commit 2831216 into main May 1, 2026
5 checks passed
@damiani damiani deleted the nd/serve-custom-router branch May 1, 2026 18:12
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.

Feature Request: Allow a custom router for jigsaw serve

2 participants