This article explains how to implement security headers for an ASP.NET Core API supporting OpenAPI Swagger UI.The security headers are implemented using the NetEscapades.AspNetCore.SecurityHeaders Nuget package.Different security requirements are applied to the API and the Swagger UI, with stricter headers for the API.The article provides code examples and explains how to configure and deploy the security headers.