Skip to content

Commit

Permalink
Merge pull request #85 from nightingaleproject/v1.1.0-preview19-scan-fix
Browse files Browse the repository at this point in the history
V1.1.0 preview19 scan fix
  • Loading branch information
RobertScalfani authored Nov 7, 2023
2 parents ee4e0aa + 517d982 commit 666a870
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
1 change: 0 additions & 1 deletion messaging/Controllers/SteveCapStmtController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ namespace messaging.Controllers
[ApiController]
public class SteveCapabilityStatement : CapabilityStatement
{
private readonly ApplicationDbContext _context;
protected readonly ILogger<CapabilityStatement> _logger;

public SteveCapabilityStatement(ILogger<CapabilityStatement> logger, ApplicationDbContext context) : base(logger, context)
Expand Down
4 changes: 0 additions & 4 deletions messaging/Services/ConvertToIJEBackgroundWork.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,6 @@ private IncomingMessageLog LatestMessageByNCHSId(string NCHSIdentifier)
return this._context.IncomingMessageLogs.Where(l => l.NCHSIdentifier == NCHSIdentifier).OrderBy(l => l.MessageTimestamp).LastOrDefault();
}

private bool IncomingMessageItemExists(long id)
{
return this._context.IncomingMessageItems.Any(e => e.Id == id);
}
}
}
}
9 changes: 9 additions & 0 deletions messaging/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,15 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerF
{
app.UseHttpLogging();
app.UseHttpsRedirection();
app.Use(async (context, next) =>
{
context.Response.Headers.Add("Content-Type", "application/json");
context.Response.Headers.Add("X-Content-Type-Options", "nosniff");
context.Response.Headers.Add("X-XSS-Protection", "1;mode=block");
context.Response.Headers.Add("Cache-Control", "no-store");
context.Response.Headers.Add("Content-Security-Policy", "default-src");
await next.Invoke();
});
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
Expand Down

0 comments on commit 666a870

Please sign in to comment.