Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V1.1.0 preview19 scan fix #85

Merged
merged 2 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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