We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5199a5f commit 777245cCopy full SHA for 777245c
api/controllers/PackageController.js
@@ -58,7 +58,7 @@ module.exports = {
58
return res.rstudio_redirect(301, '/search?q=' + encodeURIComponent(packageName));
59
// there seems to be a problem with redirected requests if text/html is set as contentype for the ajax request, so I just
60
// adapt this so Rstudio still gets the html
61
- } else if (req.wantsJSON && !req.param('viewer_pane') == 1) {
+ } else if ((req.wantsJSON || req.path.startsWith('/api/')) && !req.param('viewer_pane') == 1) {
62
_package = _package.toJSON();
63
_package.type = 'package';
64
return res.json(_package);
0 commit comments