0
0

Compare commits

..

No commits in common. "57f7cb28a5288ea280be793776998af94773f7fe" and "453faf853b792344c76f493acd979f842c7d3d22" have entirely different histories.

8 changed files with 6 additions and 43 deletions

View File

@ -2,7 +2,6 @@
**/bin/
**/obj/
**/out/
**/wwwroot/Content
# files
Dockerfile*
@ -11,4 +10,3 @@ Dockerfile*
**/*.ps1
**/*.cmd
**/*.sh
**/Database/*.db

View File

@ -1,3 +0,0 @@
{
"dotnet.defaultSolution": "MyDarling.sln"
}

View File

@ -4,16 +4,14 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta name="description" content="Нижнее бельё ручной работы по вашим индивидуальным меркам.
Сошьём бельё мечты по вашим меркам за 4-7 дней. Находимся в Новороссийске. Доставляем по городу и РФ." />
<meta name="author" content="Екатерина Мануйлова" />
<meta name="description" content="" />
<meta name="author" content="" />
<meta property="og:title" content="My Darling Underwear" />
<meta property="og:url" content="https://mydarlingunderwear.ru/" />
<meta property="og:description" content="Нижнее бельё ручной работы по вашим индивидуальным меркам" />
<meta property="og:image" content="https://mydarlingunderwear.ru/assets/img/bg-signup.jpg" />
<title>My Darling Underwear - нижнее бельё ручной работы</title>
<link rel="shortcut icon" type="image/png" href="/assets/favicon.png" />
<link rel="shortcut icon" type="image/x-icon" href="/assets/favicon.ico" />
<script src="/lib/font-awesome/js/all.js"></script>
<link href="/lib/fancyapps-ui/fancybox.css" rel="stylesheet" />
<link href="/css/styles.css" rel="stylesheet" />

View File

@ -2,7 +2,7 @@ using Microsoft.EntityFrameworkCore;
using MyDarling.Models;
using MyDarling.Services;
using Microsoft.AspNetCore.Identity;
using MyDarling.Controllers;
var builder = WebApplication.CreateBuilder(args);
@ -28,7 +28,6 @@ builder.Services.Configure<IdentityOptions>( opts =>
});
builder.Services.AddTransient<IImageResizer, ImageResizer>();
builder.Services.AddScoped<IRobotsTxtGenerator, RobotsTxtGenerator>();
builder.Services.AddControllersWithViews();
builder.Services.AddRazorPages();
@ -39,10 +38,6 @@ app.MapControllers();
app.MapDefaultControllerRoute();
app.MapRazorPages();
var robotsScope = app.Services.CreateScope();
var robotsGenerator = robotsScope.ServiceProvider.GetService<IRobotsTxtGenerator>();
app.MapGet("/robots.txt", () => robotsGenerator!.GetRobotsText());
app.UseAuthentication();
app.UseAuthorization();
IdentitySeedData.CreateAdminAccount(app.Services, app.Configuration);

View File

@ -1,17 +0,0 @@
using System.Text;
namespace MyDarling.Controllers;
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();
}
}

View File

@ -1,8 +0,0 @@
using System.Text;
namespace MyDarling.Controllers;
public interface IRobotsTxtGenerator
{
public string GetRobotsText();
}

View File

@ -2,13 +2,13 @@ version: '3'
services:
my-darling:
image: gitea.cebotari.ru/chebser/mydarling-dotnet:latest
build: .
container_name: mydarling-dotnet
ports:
- "5050:5000"
volumes:
- db:/app/Database
- content:/app/wwwroot/Content
- content:/app/wwwroot/content
environment:
- ADMIN_PASSWORD=He110World!

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB