prerender.io 和 asp.net core 验证失败
我使用 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.
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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这个 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.