-
Notifications
You must be signed in to change notification settings - Fork 19
Spider Plugin Middleware
Si Carter edited this page Oct 13, 2018
·
1 revision
The spider Plugin module is designed to automatically create a robots.txt file. This is done by adding attributes to either a controller class or individual methods within the controller class, like:
`[Route("api/DemoApi")]
[DenySpider]
[ApiController]
public class DemoApiController : ControllerBase
{
}`
When initialised, the Spider plugin will read all routes within the application, building a list of denied paths for the robots.txt file.
If the User Session middleware plugin is also loaded, the Spider Plugin will return a 403 forbidden response, should a bot attempt to access a denied route.