Added a logger and broadcasting on ssl port
continuous-integration/drone/push Build is passing Details

pull/1/head
Xander Sigler 12 months ago
parent f369fc86ed
commit 4f90a7d0f1

@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.32929.386
# Visual Studio Version 17
VisualStudioVersion = 17.3.32929.385
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AdventOfCode", "AdventOfCode\AdventOfCode.csproj", "{30F2887D-526F-4068-A581-E20BAF52F900}"
EndProject
@ -9,6 +9,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AdventOfCode.InputFetcher",
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AdventOfCode.Tests", "AdventOfCode.Tests\AdventOfCode.Tests.csproj", "{03C0BB76-6521-4B51-B267-346E88678D79}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{0AA4CCC1-FCBA-4C0E-BB5F-0F4E41907DC9}"
ProjectSection(SolutionItems) = preProject
.drone.yml = .drone.yml
.gitignore = .gitignore
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU

@ -23,6 +23,7 @@ namespace AdventOfCode.Controllers
[Consumes("text/plain")]
public AOCResponse Day(int year, int day, AOCVersion version, [FromBody] string input, bool IgnoreLogMessages = false)
{
_logger.LogInformation($"Recieving a request for {year} day {day} version {version} with {(IgnoreLogMessages ? "no" : "")}logs");
AOCRequest request = new AOCRequest() { Input = input, Version = version, IgnoreLogMessages = IgnoreLogMessages };
var resp = GetAOCDay(year, day).ExecuteDay(request);
return resp;

@ -13,6 +13,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:5.0
WORKDIR /app
COPY --from=build-env /app/out .
ENV ASPNETCORE_ENVIRONMENT=Production
ENV ASPNETCORE_URLS=http://+:80
ENV ASPNETCORE_URLS=https://+:443;http://+:80
ENTRYPOINT ["dotnet", "AdventOfCode.dll"]

@ -39,7 +39,7 @@ namespace AdventOfCode
services.AddControllers();
services.AddSwaggerGen(c =>
{
c.SwaggerDoc("v1", new OpenApiInfo { Title = "AdventofCode", Version = "v1" });
c.SwaggerDoc("v1", new OpenApiInfo { Title = "AdventofCode", Version = "v1.0.0" });
});
services.AddControllers(o => o.InputFormatters.Insert(o.InputFormatters.Count, new TextPlainInputFormatter()));
services.AddSwaggerGenNewtonsoftSupport();
@ -56,7 +56,7 @@ namespace AdventOfCode
app.UseSwagger();
app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "AdventOfCode v1"));
app.UseHttpsRedirection();
//app.UseHttpsRedirection();
app.UseRouting();

Loading…
Cancel
Save