Change the headers of static files in Asp.net Core

后端 未结 5 1678
误落风尘
误落风尘 2020-12-06 05:47

I am using package Microsoft.AspNet.StaticFiles and configuring it in Startup.cs as app.UseStaticFiles(). How can I change the headers

5条回答
  •  一个人的身影
    2020-12-06 06:43

    Under IIS, you can add a web.config file to your wwwroot folder with header configurations. An example that will control cache headers for all files:

    
    
      
    
        
        
          
            
          
        
    
      
    
    

提交回复
热议问题