Skip to content

Add options for cookie handling #2609

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
aspnet-hello opened this issue Jan 2, 2018 · 6 comments
Closed

Add options for cookie handling #2609

aspnet-hello opened this issue Jan 2, 2018 · 6 comments
Labels
area-middleware Includes: URL rewrite, redirect, response cache/compression, session, and other general middlewares feature-response-caching
Milestone

Comments

@aspnet-hello
Copy link

From @gpeipman on Wednesday, March 8, 2017 2:56:24 AM

It would be nice if there are options for cookies handling. Two things I can propose:

  1. Option to ignore all cookies (they are often used for client-side stuff only in public sites)
  2. Option to give names of cookies to ignore

Second option is specially important as currently it is not possible to use Application Insights with response caching as AI uses cookies when browser-side diagnostics are enabled. I think in this case request cookies must be just copied to response to not delete them.

Copied from original issue: aspnet/ResponseCaching#113

@aspnet-hello
Copy link
Author

From @JunTaoLuo on Wednesday, March 8, 2017 11:31:11 AM

This could be useful. It would be another reason we need aspnet/ResponseCaching#52.

@aspnet-hello
Copy link
Author

From @gpeipman on Sunday, March 12, 2017 1:36:48 AM

I made copy of classes in 1.1 branch to my prototype solution and commented out the check for cookie header. Application Insights started working after this.

@aspnet-hello
Copy link
Author

From @Tratcher on Friday, March 17, 2017 3:58:53 PM

Doesn't ResponseCaching already ignore all Set-Cookie headers?

@aspnet-hello
Copy link
Author

From @gpeipman on Saturday, March 18, 2017 5:17:51 AM

It doesn't ignore these. It doesn't cache if this header is present.

@aspnet-hello
Copy link
Author

From @RehanSaeed on Tuesday, July 18, 2017 9:21:14 AM

aspnet/ResponseCaching#128 is related. No caching also occurs if the Authorization HTTP header is present.

My proposal is that when the Authorization HTTP header is present, the cached entry should be taken, the Authorization and Set-Cookie HTTP headers on it should be updated from the current request and the response returned. #52 would mean we could do this ourselves but I think the above should be built in to the middleware.

@JunTaoLuo
Copy link
Contributor

We'll look into this scenario when planning for Output Caching: #27387

@ghost ghost locked as resolved and limited conversation to collaborators Dec 9, 2020
@amcasey amcasey added area-middleware Includes: URL rewrite, redirect, response cache/compression, session, and other general middlewares and removed area-runtime labels Jun 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-middleware Includes: URL rewrite, redirect, response cache/compression, session, and other general middlewares feature-response-caching
Projects
None yet
Development

No branches or pull requests

5 participants