Allow script tags in .Net Core Prerender.io middlewear
NickName:Brandon McAlees Ask DateTime:2019-12-24T13:32:52

Allow script tags in .Net Core Prerender.io middlewear

I'm running .Net Core middleware and an AngularJS front-end. On my main page, I have google analytics script tags, and other script tags necessary for verifying with third-party providers. Prerender.io removes these by default, however, there's a plugin "removeScriptTags". Does anyone have experience turning this off with the .Net Core Middleware?

A better solution may be to blacklist the crawlers you don't want seeing cached content, though I'm not sure this is configurable. In my case, it looks like all the user-agents below are accessing Prerender.io cached content.

enter image description here

Here is my "crawlerUserAgentPattern" which are the crawlers that should be allowed to access the cached content. I don't see the ones above on this list so I'm confused as to why they're allowed to access.

"(SeobilityBot)|(Seobility)|(seobility)|(bingbot)|(googlebot)|(google)|(bing)|(Slurp)|(DuckDuckBot)|(YandexBot)|(baiduspider)|(Sogou)|(Exabot)|(ia_archiver)|(facebot)|(facebook)|(twitterbot)|(rogerbot)|(linkedinbot)|(embedly)|(quora)|(pinterest)|(slackbot)|(redditbot)|(Applebot)|(WhatsApp)|(flipboard)|(tumblr)|(bitlybot)|(Discordbot)"

Copyright Notice:Content Author:「Brandon McAlees」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/59464236/allow-script-tags-in-net-core-prerender-io-middlewear

More about “Allow script tags in .Net Core Prerender.io middlewear” related questions

Allow script tags in .Net Core Prerender.io middlewear

I'm running .Net Core middleware and an AngularJS front-end. On my main page, I have google analytics script tags, and other script tags necessary for verifying with third-party providers. Prerende...

Show Detail

prerender.io and asp.net core verification failed

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 fo...

Show Detail

prerender.io and asp.net core verification failed

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 fo...

Show Detail

Angular 2 - How to use prerender.io along with lazy loading

Since Angular Universal isn't going to be in the CLI for quite a while I must use prerender.io to allow SEO to work properly. However, after some tests it appears that it doesn't work all that great

Show Detail

ASP.NET Identity 2.0 OWIN Cookie Authentication Middlewear

Is there a way to intercept the event when an authentication cookie is read, validated and if valid the ClaimsIdentity object is created by the OWIN Cookie Authentication Middlewear.

Show Detail

Prerender.io Not Working in Production

I'm trying to get my MEAN stack app set up for proper SEO, using the prerender.io middleware. Locally, everything is working great. In production, nada.The app is hosted on OpenShift. I'm using

Show Detail

Why errorHandler middlewear is getting called 2 time in express?

const express = require('express') const app = express(); function middleWear1(req, res, next) { throw Error() } function errorHandler(err, req, res, next) { console.log("error handled&

Show Detail

Prerender.io with Angular Universal - doesn't render HTML within component tags

I have created an Angular Universal app that consists of nested components. I need Prerender.io to return the Server-Side-Rendered HTML from my app but Prerender.io only returns the top level compo...

Show Detail

Laravel 5 middlewear doesn't work on Route::group

So I have a route group as defined below: Route::group(['prefix' => '/api/v2', 'middlewear' => 'auth'], function () { Route::resource(...); //more routes defined here });&#

Show Detail

Load specific middlewear instead of using next();

I have a few route like this: app.post('/user/me', c.auth, c.striper.make, c.user.edit, c.user.requestDriver, render); app.post('/user/:id', c.auth, c.targetUser, ...

Show Detail