mirror of
https://github.com/TomasiDeveloping/PlayerManagement.git
synced 2026-04-16 17:22:21 +00:00
fix for new hosting
This commit is contained in:
parent
18ea1a1540
commit
3c19151def
@ -33,4 +33,8 @@
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Properties\PublishProfiles\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@ -8,20 +8,24 @@ using Microsoft.AspNetCore.Diagnostics.HealthChecks;
|
||||
using Serilog;
|
||||
using Utilities.Classes;
|
||||
|
||||
|
||||
Log.Logger = new LoggerConfiguration()
|
||||
.WriteTo.Console()
|
||||
.CreateBootstrapLogger();
|
||||
|
||||
try
|
||||
{
|
||||
Log.Information("Starting API . . . ");
|
||||
Log.Information("Starting Player Manager API . . . ");
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
builder.Services.AddSerilog(options =>
|
||||
var logPath = Path.Combine(AppContext.BaseDirectory, "logs", "log-.txt");
|
||||
builder.Host.UseSerilog((context, _, configuration) =>
|
||||
{
|
||||
options.ReadFrom.Configuration(builder.Configuration);
|
||||
configuration.ReadFrom.Configuration(context.Configuration)
|
||||
.WriteTo.File(logPath, rollingInterval: RollingInterval.Day, rollOnFileSizeLimit: true);
|
||||
});
|
||||
|
||||
|
||||
builder.Services.AddDatabase(builder.Configuration);
|
||||
builder.Services.AddApplication();
|
||||
|
||||
|
||||
24
Api/Web.config
Normal file
24
Api/Web.config
Normal file
@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<system.webServer>
|
||||
<!-- Deactivate WebDAV to enable PUT/DELETE -->
|
||||
<modules>
|
||||
<remove name="WebDAVModule" />
|
||||
</modules>
|
||||
<handlers>
|
||||
<remove name="WebDAV" />
|
||||
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
|
||||
</handlers>
|
||||
|
||||
<!-- Allows only POST, PUT and DELETE -->
|
||||
<security>
|
||||
<requestFiltering>
|
||||
<verbs applyToWebDAV="false">
|
||||
<add verb="POST" allowed="true" />
|
||||
<add verb="PUT" allowed="true" />
|
||||
<add verb="DELETE" allowed="true" />
|
||||
</verbs>
|
||||
</requestFiltering>
|
||||
</security>
|
||||
</system.webServer>
|
||||
</configuration>
|
||||
Loading…
x
Reference in New Issue
Block a user