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

JsonResponse not getting correct header #646

Open
FredrikPAC opened this issue Aug 30, 2023 · 1 comment
Open

JsonResponse not getting correct header #646

FredrikPAC opened this issue Aug 30, 2023 · 1 comment

Comments

@FredrikPAC
Copy link

I have an error with the following:
On line 428 it checks if the response is an instance of a Illuminate\Http\Response making all responses that are Illuminate\Http\JsonResponse fail. Could this be changed to the more core Symfony\Component\HttpFoundation\Response instead?

if (! ($response instanceof Response)) {
return $response;
}
if ($this->isCollectingClientMetrics() || $this->isToolbarEnabled()) {
$clockworkBrowser = [
'requestId' => $clockworkRequest->id,
'version' => Clockwork::VERSION,
'path' => $request->getBasePath() . '/__clockwork/',
'webPath' => $request->getBasePath() . '/' . $this->webPaths()[0] . '/app',
'token' => $clockworkRequest->updateToken,
'metrics' => $this->isCollectingClientMetrics(),

@itsgoingd
Copy link
Owner

Hey, sorry I missed this issue somehow. I think this is intentional, as the toolbar does not really work for api responses atm.

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

No branches or pull requests

2 participants