prerender.io 和 asp.net core 验证失败

发布于 2025-01-10 16:17:55 字数 938 浏览 4 评论 0原文

我使用 aurelia(单页应用程序)创建了一个网站。由于 SEO 元标记是在客户端运行时添加的,因此搜索引擎无法获取这些标记。 我发现 prerender.io 作为这个问题的解决方案,但是我无法让它来验证我的应用程序。

验证失败

我的后端是由 asp.net core 实现的,并且作为应用程序服务运行。 我使用了这个中间件: https://github .com/dingyuliang/prerender-dotnet/wiki/Prerender-Middleware-for-ASP.NET-Core

我的配置是:

{
  "PrerenderConfiguration": {
    "ServiceUrl": "http://service.prerender.io",
    "Token": null,
    "CrawlerUserAgentPattern": null,
    "WhiteListPattern": null,
    "BlackListPattern": "lib|css|js",
    "AdditionalExtensionPattern": null,
    "ProxyUrl": null,
    "ProxyPort": 80
  }
}

我也已经尝试将配置中的“令牌”设置为我可以的登录后在网站左上角看到。 我是否遗漏了任何步骤,或者 github 页面上的说明不完整?

I used aurelia (single page application) to create a website. Since SEO meta tags are added during runtime on client side search engines cant pick up these tags.
I found prerender.io as solution for this problem, however I just cant get it to verify my application.

Verification failes

My backend is implemented asp.net core and is running as a app service.
I used this Middleware: https://github.com/dingyuliang/prerender-dotnet/wiki/Prerender-Middleware-for-ASP.NET-Core

My configuration is:

{
  "PrerenderConfiguration": {
    "ServiceUrl": "http://service.prerender.io",
    "Token": null,
    "CrawlerUserAgentPattern": null,
    "WhiteListPattern": null,
    "BlackListPattern": "lib|css|js",
    "AdditionalExtensionPattern": null,
    "ProxyUrl": null,
    "ProxyPort": 80
  }
}

I also already tried setting the "Token" in the Configuration to the one I can see on the website after login in the upper left corner.
Is there any step I'm missing or are the instructions on the github page incomplete?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

空城仅有旧梦在 2025-01-17 16:17:55

这个 github 仓库似乎不再维护了。拉取请求,例如 https://github.com/dingyuliang/prerender-dotnet/pull/6/commits/77a8cdd8931ee5bf1955f39d03b9ba2150ee5e2c 多年来都没有经历过。我不确定发生了什么,但 nuget 包中的 dll 无法工作(也许是旧版本?)。
然而代码本身是有效的。我最终复制了我需要的所有文件(Constants.cs、PrerenderConfiguration.cs、PrerenderMiddleware.cs、PrerenderMiddlewareExtendsions.cs 和 WebProxy.cs),合并了一些新建议并将其添加到我的解决方案中。现在可以了。

It seems that this github repo ist no longer maintained. Pull requests like https://github.com/dingyuliang/prerender-dotnet/pull/6/commits/77a8cdd8931ee5bf1955f39d03b9ba2150ee5e2c are not going through for years. Im not sure whats going on but the dll in the nuget package is not working (maybe old build?).
The code itself is working however. I ended up copying all files I needed (Constants.cs, PrerenderConfiguration.cs, PrerenderMiddleware.cs, PrerenderMiddlewareExtendsions.cs and WebProxy.cs) merged some new suggestions and added it so my solution. It works now.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文