Skip to content
This repository has been archived by the owner on Jun 10, 2020. It is now read-only.

Support disabling the creation of Request-Context header via configuration #613

Closed
juho-hanhimaki opened this issue Feb 28, 2018 · 4 comments
Milestone

Comments

@juho-hanhimaki
Copy link

juho-hanhimaki commented Feb 28, 2018

Repro Steps

  1. Create ASP.NET Core project and enable Application Insights.

Actual Behavior

Request-Context HTTP header gets set for every (except first?) request.

Expected Behavior

Ability to disable the creation of Request-Context header via configuration or other method.

Version Info

SDK Version : 2.2.1
.NET Version: 2.0.5

Workaround

Custom middleware that removes the header.

            app.Use((context, next) =>
            {
                context.Response.Headers.Remove("Request-Context");
                return next();
            });

Motivation

APIs for Industrial Internet and other scenarios where the bandwidth and client resources are limited and should be used sparingly.

@cijothomas
Copy link
Contributor

@cijothomas
Copy link
Contributor

Sorry I misread the issue.
As of now there are no config options to achieve this. We are working on config story for aspnet core sdk, and will take this one as part of it.

@cijothomas
Copy link
Contributor

This was accidently closed. Need to be addressed along with this:
#650

@cijothomas cijothomas added this to the 2.3.0 milestone Apr 19, 2018
@cijothomas cijothomas modified the milestones: 2.3.0, 2.4.0 May 2, 2018
@cijothomas cijothomas modified the milestones: 2.4.0, 2.5.0 Aug 3, 2018
@cijothomas cijothomas modified the milestones: 2.5.0, 2.6.0 Oct 3, 2018
@lmolkova
Copy link
Member

Fixed in #716, set ApplicationInsightsServiceOptions.RequestCollectionOptions.InjectResponseHeaders to false to disable response header injection.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants