Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rnelson/libexec.aspnetcore.environmentheaders
ASP.NET Core middleware for adding environment information to response headers
https://github.com/rnelson/libexec.aspnetcore.environmentheaders
aspnet aspnetcore http
Last synced: 11 days ago
JSON representation
ASP.NET Core middleware for adding environment information to response headers
- Host: GitHub
- URL: https://github.com/rnelson/libexec.aspnetcore.environmentheaders
- Owner: rnelson
- License: mit
- Created: 2019-09-07T16:50:14.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2025-01-10T14:29:38.000Z (11 days ago)
- Last Synced: 2025-01-10T15:35:03.895Z (11 days ago)
- Topics: aspnet, aspnetcore, http
- Language: C#
- Homepage:
- Size: 48.8 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# EnvironmentHeaders Middleware
![Build status](https://github.com/rnelson/Libexec.AspnetCore.EnvironmentHeaders/actions/workflows/dotnet.yml/badge.svg) ![License](https://img.shields.io/github/license/rnelson/Libexec.AspnetCore.EnvironmentHeaders%20) ![NuGet](https://img.shields.io/nuget/v/Libexec.AspnetCore.EnvironmentHeaders) [deps.dev](https://deps.dev/nuget/libexec.aspnetcore.environmentheaders)
The EnvironmentHeaders middleware is a small ASP.NET Core middleware package that adds [a few response headers](https://github.com/rnelson/Libexec.AspnetCore.EnvironmentHeaders/blob/main/Libexec.AspnetCore.EnvironmentHeaders/EnvironmentHeaders.cs#L14-L19) to every request to aid in troubleshooting.
## Usage
To use this package, simply add `Libexec.AspnetCore.EnvironmentHeaders` to your project then call [`AddEnvironmentHeaders()`](https://github.com/rnelson/Libexec.AspnetCore.EnvironmentHeaders/blob/main/Libexec.AspnetCore.EnvironmentHeaders.Tests/Program.cs#L9-L12) and [`UseEnvironmentHeaders()`](https://github.com/rnelson/Libexec.AspnetCore.EnvironmentHeaders/blob/main/Libexec.AspnetCore.EnvironmentHeaders.Tests/Program.cs#L17) during initialization.
It is recommended you [do not include this middleware in production](https://github.com/rnelson/Libexec.AspnetCore.EnvironmentHeaders/blob/main/Libexec.AspnetCore.EnvironmentHeaders.Tests/Program.cs#L11).
## License
Released under the [MIT License](http://rnelson.mit-license.org).