7 Replies Latest reply on Jul 4, 2016 5:40 AM by vanduc1102

    Wildfly adds Cache-Control header.

    peter.ivarsson

      Hi,

       

      I add Cache-Control header in my code with the line.

      return Response.ok( showList ).cacheControl( CacheControlFactory.create( cacheTimeDAO, uriInfo ) ).build();     

      And this works fine.

       

      But it seems that Wildfly adds a extra Cache-Control header, so in my REST client I get two Chache-Contoll headers:

      Response headers:

      Expires: 0

       

       

      Cache-Control: no-cache, no-store, must-revalidate

       

       

      Cache-Control: no-cache, no-transform, no-store, max-age=600

       

      :

       

      Is the a Bug?     (Should not Wildfly check if there already is a Cache-Control header set before adding a new one)

       

      Is there a way to stopp Wildfly to add Cache-Control headers?

       

      / Peter