-
Notifications
You must be signed in to change notification settings - Fork 509
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
fix: don't render json response if url contains /api/
#951
Conversation
Codecov Report
@@ Coverage Diff @@
## main #951 +/- ##
=======================================
Coverage 67.59% 67.59%
=======================================
Files 59 59
Lines 6030 6030
Branches 679 679
=======================================
Hits 4076 4076
Misses 1945 1945
Partials 9 9 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Isn't that a breaking change? With Nuxt requests to |
~> see #969 the behaviour you mention was a bug, but one that surfaced due to this change but not caused by it. Or so I tell myself π |
Thank you for the background, I see π Intuitively I'd expect "root" I have an endpoint that either returns a specific content type ( |
I understand what you mean, though equally I would not expect users to access an Would you open an issue to discuss adding a cc: @pi0 who may have a better idea. |
Reverting in #971 for now. |
I've created #978 as a place where a discussion can continue. |
π Linked issue
nuxt/nuxt#19093
β Type of change
π Description
Although a helpful idea, I think this is too broad a net for rendering an API response. Even routes starting with
/api
might still benefit from an HTML response if requested from a browser.π Checklist