Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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).