Base solution for your next web application
Open Closed

Remove/override cache-control property from the Response Header #10428


User avatar
0
mahendra created

Prerequisites

  • What is your product version?
  • What is your product type (Angular or MVC)?
    • Angular
  • What is product framework type (.net framework or .net core)?
    • .net core

Hi Experts,

We want to remove/override the cache-control properties from the response header. Please see the attached escreenshot below.

. Could you please help us how can we acheive following:

  1. Override this property (e.g. cache-control:public, max-age=31536000)
  2. Remove this property from the response header.

Any help would be much appreciated.

Thanks,


2 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Could you try setting configuration below in your web Module's PreInitialize method ?

    Configuration.Modules.AbpAspNetCore().DefaultResponseCacheAttributeForAppServices
    

    or

    Configuration.Modules.AbpAspNetCore().DefaultResponseCacheAttributeForControllers
    
  • User Avatar
    0
    musa.demir created

    Duplicate of https://support.aspnetzero.com/QA/Questions/10430/Webconfig-file-in-hosted-environments-in-angular-application.

    Answer: https://support.aspnetzero.com/QA/Questions/10430/Webconfig-file-in-hosted-environments-in-angular-application#answer-0eb1b715-b9d9-cab3-55a5-39fd91fe51be