Closed n3storm closed 8 months ago
Hi there, thanks for raising this and offering to write a PR. Option B would be preferred as we are currently supporting both Laravel 9 and 10.
That PR broke all my inertia requests.
I am not sure why this was needed. I am running L10 in production with Laravel Actions making of html and json response methods on the same action as expected
@jameswagoner Ugh sorry about that. I'll revert this PR and publish a new patch version.
@n3storm Can you provide more information as to why that change was necessary for you?
I am reviewing this issue now
My bad sorry to you all @jameswagoner and @lorisleiva
Laravel expects an "Accept" header requesting JSON data, not Content-type, in order to response JSON
https://github.com/laravel/passport/issues/100#issuecomment-248917207
Is not a default header when using tools like Postman nor Insomnia and is wrongly documented with Content-type header at several internet resources.
/src/Decorators/ControllerDecorator.php at lines 73 and 75 should use isJson()
or check both for backwards compatibility:
Comment this issue if you want me to pull request and which option would you prefer.