summaryrefslogtreecommitdiff
path: root/Services/IRobotsTxtGenerator.cs
blob: 22bc5a742c61d7df6b9b9108497beecf7df8447d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
using System.Text;

namespace MyDarling.Controllers;

public interface IRobotsTxtGenerator
{
	public string GetRobotsText();
}

public class RobotsTxtGenerator : IRobotsTxtGenerator
{
	public string GetRobotsText()
	{
		StringBuilder stringBuilder = new();		
		stringBuilder.AppendLine("user-agent: *");		
		stringBuilder.AppendLine("Disallow: /freedom");		
		stringBuilder.AppendLine("Disallow: /Account/");
		stringBuilder.AppendLine("Disallow: /account/");            	
		
        return stringBuilder.ToString();
	}
}