Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Access denied or empty body

未关闭
#209 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
javascript, node.js, redis
领域
backend

调研方向

Start by reproducing the 403 or empty-body response with the shown prerender-node middleware, comparing requests with and without the Googlebot user agent. Inspect the beforeRender and afterRender hooks, Redis cache behavior, and the /render?url=https://www.google.com/ path. Done means identifying the failure and restoring a non-empty response with useful error logging.

由索引模型根据 Issue 内容生成。

描述

Issue: HTTP ERROR 403 - Access denied.
Issue appears during last 3 days, before everything was working fine.

Setup:

  • Server is Linux Ubuntu
  • Local prerender under Node, which is working fine, can access page: /render?url=https://www.google.com/
  • "prerender-node" setup with Redias cache.
  • Assessing website by browsing with googlebot in User agent string.

Deep dive into testing:

  • Website is accessible without googlebot in User agent string.
  • In afterRender event getting empty body for any request url
  • In afterRender error object is null
  • Redis cache is working, even when removing cache mechanism fully, issue persist
  • Files permission is correct and was not changed.
  • When removing app.use(prerender); website again accessible with googlebot in User agent string.
  • Version of packages including "prerender-node" was not released, so nothing to update
  • Version of "google-chrome-stable" checked and updated to latest one - 92.0.4515
  • Reason of this all points is not applicable: [https://docs.prerender.io/article/25-empty-or-partially-rendered-pages](Empty or partially rendered pages) as it is working with url /render?url=https://www.google.com/
  • pageDoneCheckInterval increased up to 20sec to make sure it is not a reason
  • Getting empty body immediately, some some error is happening there, but no any error log, as I have pageDoneCheckInterval: 5000, I should get response in 5 sec, which is not happening.

Ideas what can be a reason:

  • Something got broken in process of Prerender in some dependencies.
  • There is some limit of requested pages per month, but as I use Prerender locally, as I understood it is not limited somehow.
  • Some another crazy reason))

Code prerender section for any case:

// Setup prerender
prerender = require('prerender-node');
prerender.set('protocol', 'https');
prerender.crawlerUserAgents.push('Validator.nu/LV');
prerender.crawlerUserAgents.push('W3C-checklink');
app.use(prerender);

// Setup redis cache
var redis = require("redis"),
	client = redis.createClient();

client.flushdb( function (err, succeeded) {
});

prerender.set('beforeRender', function(req, done) {
	client.get(req.url, done);
}).set('afterRender', function(err, req, prerender_res) {
  if ( prerender_res ) {
    client.set(req.url, prerender_res.body)
  }
});

Anyway this was working previously very long and very stable.

Any idea will appreciated, thanks in advance.

主要语言
JavaScript
星标
921
派生
185
PR 合并指标
30 天内没有已合并 PR

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

prerender/prerender-node 的其他 Issue

查看 prerender/prerender-node 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。