mirror of
https://github.com/yawaflua/yaflay.ru.git
synced 2026-04-25 17:20:38 +03:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0fa9a491ae | |||
| 11cc55256f | |||
| 998d697622 | |||
| 6ff6867b70 |
+11
-1
@@ -1,22 +1,32 @@
|
|||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
|
using HeyRed.OEmbed;
|
||||||
namespace yaflay.ru
|
namespace yaflay.ru
|
||||||
{
|
{
|
||||||
public class Startup
|
public class Startup
|
||||||
{
|
{
|
||||||
private readonly IConfiguration configuration;
|
private readonly IConfiguration configuration;
|
||||||
|
private readonly OEmbedOptions options;
|
||||||
public Startup()
|
public Startup()
|
||||||
{
|
{
|
||||||
configuration = new ConfigurationBuilder()
|
configuration = new ConfigurationBuilder()
|
||||||
.AddEnvironmentVariables(prefix: "m.")
|
.AddEnvironmentVariables(prefix: "m.")
|
||||||
.AddJsonFile("appsettings.json", optional: true)
|
.AddJsonFile("appsettings.json", optional: true)
|
||||||
.Build();
|
.Build();
|
||||||
|
options = new OEmbedOptions()
|
||||||
|
{
|
||||||
|
EnableCache = true
|
||||||
|
};
|
||||||
}
|
}
|
||||||
public void ConfigureServices(IServiceCollection services)
|
public void ConfigureServices(IServiceCollection services)
|
||||||
{
|
{
|
||||||
services.AddControllers();
|
services.AddControllers();
|
||||||
services.AddRouting();
|
services.AddRouting();
|
||||||
services.AddRazorPages();
|
services.AddRazorPages();
|
||||||
|
services.AddOEmbed(options =>
|
||||||
|
{
|
||||||
|
options.EnableCache = true; // true by default
|
||||||
|
options.EnsureNotNull();
|
||||||
|
});
|
||||||
//services.AddDirectoryBrowser();
|
//services.AddDirectoryBrowser();
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -7,4 +7,6 @@
|
|||||||
"storespw": "https://github.com/PoopStore-Team",
|
"storespw": "https://github.com/PoopStore-Team",
|
||||||
"gh-team": "https://github.com/PoopStore-Team",
|
"gh-team": "https://github.com/PoopStore-Team",
|
||||||
"twitch": "https://twitch.tv/bebra_yaflay",
|
"twitch": "https://twitch.tv/bebra_yaflay",
|
||||||
|
"patreon": "https://patreon.com/yaflay",
|
||||||
|
"steam": "https://steamcommunity.com/id/bebra_YaFlay/"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,8 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.18.1" />
|
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.18.1" />
|
||||||
|
<PackageReference Include="OEmbed" Version="3.0.0" />
|
||||||
|
<PackageReference Include="OEmbed.Extensions.Microsoft.DependencyInjection" Version="3.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
Reference in New Issue
Block a user