Skip to content
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

Add JSON:API support for Drupal #705

Merged
merged 1 commit into from
May 10, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cli/drivers/DrupalValetDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function frontControllerPath($sitePath, $siteName, $uri)
{
$sitePath = $this->addSubdirectory($sitePath);

if (!isset($_GET['q']) && !empty($uri) && $uri !== '/') {
if (!isset($_GET['q']) && !empty($uri) && $uri !== '/' && strpos($uri, '/jsonapi/') === false) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👋 I'm the JSON:API maintainer in Drupal.

Bear in mind that the /jsonapi path is configurable. So is anyone changes the defaults this may break.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@e0ipso oh yeah. I completely missed that. Funny thing is, IIRC, I wrote the patch to make this configurable. 😄

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for sharing, y'all! Sooo.. is there any way to fix this driver or is that just not going to be possible since it's totally variable?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a custom prefix and good to have this issue to know where should I look for in valet. thanks!

$_GET['q'] = $uri;
}

Expand Down