Skip to content

Commit 7dfaf18

Browse files
committed
Reverted Open API and report API CSP changes also.
1 parent eaf3e21 commit 7dfaf18

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

OpenAPI/LearningHub.Nhs.OpenApi/Startup.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -211,16 +211,16 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
211211
c.OAuthUsePkce();
212212
});
213213

214-
app.Use(async (context, next) =>
215-
{
216-
context.Response.Headers.Add("content-security-policy", "object-src 'none'; frame-ancestors 'none'; sandbox allow-forms allow-same-origin allow-scripts allow-popups; base-uri 'self';");
217-
context.Response.Headers.Add("Referrer-Policy", "no-referrer");
218-
context.Response.Headers.Add("Strict-Transport-Security", "max-age=31536000; includeSubDomains");
219-
context.Response.Headers.Add("X-Content-Type-Options", "nosniff");
220-
context.Response.Headers.Add("X-Frame-Options", "SAMEORIGIN");
221-
context.Response.Headers.Add("X-XSS-protection", "0");
222-
await next();
223-
});
214+
////app.Use(async (context, next) =>
215+
////{
216+
//// context.Response.Headers.Add("content-security-policy", "object-src 'none'; frame-ancestors 'none'; sandbox allow-forms allow-same-origin allow-scripts allow-popups; base-uri 'self';");
217+
//// context.Response.Headers.Add("Referrer-Policy", "no-referrer");
218+
//// context.Response.Headers.Add("Strict-Transport-Security", "max-age=31536000; includeSubDomains");
219+
//// context.Response.Headers.Add("X-Content-Type-Options", "nosniff");
220+
//// context.Response.Headers.Add("X-Frame-Options", "SAMEORIGIN");
221+
//// context.Response.Headers.Add("X-XSS-protection", "0");
222+
//// await next();
223+
////});
224224

225225
app.UseHttpsRedirection();
226226

ReportAPI/LearningHub.Nhs.ReportApi/Program.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@
2020

2121
var app = builder.Build();
2222

23-
app.Use(async (context, next) =>
24-
{
25-
context.Response.Headers.Add("content-security-policy", "object-src 'none'; frame-ancestors 'none'; sandbox allow-forms allow-same-origin allow-scripts allow-popups; base-uri 'self';");
26-
context.Response.Headers.Add("Referrer-Policy", "no-referrer");
27-
context.Response.Headers.Add("Strict-Transport-Security", "max-age=31536000; includeSubDomains");
28-
context.Response.Headers.Add("X-Content-Type-Options", "nosniff");
29-
context.Response.Headers.Add("X-Frame-Options", "SAMEORIGIN");
30-
context.Response.Headers.Add("X-XSS-protection", "0");
31-
await next();
32-
});
23+
////app.Use(async (context, next) =>
24+
////{
25+
//// context.Response.Headers.Add("content-security-policy", "object-src 'none'; frame-ancestors 'none'; sandbox allow-forms allow-same-origin allow-scripts allow-popups; base-uri 'self';");
26+
//// context.Response.Headers.Add("Referrer-Policy", "no-referrer");
27+
//// context.Response.Headers.Add("Strict-Transport-Security", "max-age=31536000; includeSubDomains");
28+
//// context.Response.Headers.Add("X-Content-Type-Options", "nosniff");
29+
//// context.Response.Headers.Add("X-Frame-Options", "SAMEORIGIN");
30+
//// context.Response.Headers.Add("X-XSS-protection", "0");
31+
//// await next();
32+
////});
3333

3434
app.UseRouting();
3535
app.UseAuthorization();

0 commit comments

Comments
 (0)