diff options
| author | Leitwolf11 | 2026-10-03 18:46:59 +0300 |
|---|---|---|
| committer | Leitwolf11 | 2026-10-03 18:46:59 +0300 |
| commit | b84a2216c26cc5392d0dc300b7a605ccb288d8c8 (patch) | |
| tree | 048ae623f49cc5f2f94234d747351f9e659f5267 /apps/api/Security/SecurityHeadersMiddleware.cs | |
| parent | ec774db15976385a6d5ea6f48d3622fe507d3843 (diff) | |
| parent | cf444eb3bccf99c10f59ed5330b61c0397e0aeaa (diff) | |
| download | progmaweb-fix/api-without-google.tar.gz | |
Merge remote-tracking branch 'origin/main' into fix/api-without-googlefix/api-without-google
Diffstat (limited to 'apps/api/Security/SecurityHeadersMiddleware.cs')
| -rw-r--r-- | apps/api/Security/SecurityHeadersMiddleware.cs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/api/Security/SecurityHeadersMiddleware.cs b/apps/api/Security/SecurityHeadersMiddleware.cs index 42383ef..d17a3fe 100644 --- a/apps/api/Security/SecurityHeadersMiddleware.cs +++ b/apps/api/Security/SecurityHeadersMiddleware.cs @@ -3,8 +3,17 @@ namespace Progmasoft.Progmaweb.Api.Security; +/// <summary>Adds the security headers of a JSON API to every response.</summary> +/// <remarks> +/// The API serves no documents, so its content security policy allows nothing, it may not be framed, and its +/// responses are never cached. +/// </remarks> +/// <param name="next">The next middleware in the pipeline.</param> internal sealed class SecurityHeadersMiddleware(RequestDelegate next) { + /// <summary>Sets the headers and continues the pipeline.</summary> + /// <param name="context">The current request.</param> + /// <returns>A task that completes when the rest of the pipeline has run.</returns> public async Task InvokeAsync(HttpContext context) { IHeaderDictionary headers = context.Response.Headers; |