Layer7 API Management

Expand all | Collapse all

How to control response headers

Jump to Best Answer
  • 1.  How to control response headers

    Posted 04-28-2017 12:31 AM

    The response headers for our APIs are listed as below. 

     

    HTTP/1.1 200 OK
    Cache-Control: no-store
    Content-Encoding: gzip
    Content-Type: application/json;charset=UTF-8
    Date: Wed, 26 Apr 2017 11:31:15 GMT
    Pragma: no-cache
    Server: Hello
    Content-Length: 127
    Connection: keep-alive

     

    How to control which header parameters to send and its values?

     

    Regards

    Kareem



  • 2.  Re: How to control response headers

    Posted 04-28-2017 02:24 AM

    Good evening,

     

    To control the headers being used both going out of the gateway to the back-end or to the client you can use the Manage Transport Header assertion. Manage Transport Properties/Headers Assertion - CA API Gateway - 9.2 - CA Technologies Documentation 

     

    Sincerely,

     

    Stephen Hughes

    Director, CA Support



  • 3.  Re: How to control response headers

    Posted 04-28-2017 02:36 AM

    Thanks Stephen for the response. 

     

    If we use this approach we have to implement it in all the APIs. Is there a way to configure at Gateway level which will be applicable to all APIs?

     

    Regards

    Kareem



  • 4.  Re: How to control response headers

    Posted 04-28-2017 08:13 AM

    Kareem,

    Global Policy Fragments  will allow you to perform this action on all API's.



  • 5.  Re: How to control response headers

    Posted 05-08-2017 07:04 AM

    Hi Mohindra,

     

    It's again a coding. I believe there should be some configuration at the server level to define default response headers. 

     

     

    Regards

    Kareem



  • 6.  Re: How to control response headers

    Posted 05-08-2017 09:31 AM

    Kareem,

    I see your point. What are currently some of the road blocks with using the Global Policy Fragments vs the recommendation you are looking for. Currently I'm not aware of any CWP's to add/modify response headers.



  • 7.  Re: How to control response headers
    Best Answer

    Posted 05-18-2017 02:29 AM

    Hi Kareem,

     

    Found the below doc from CA Site which addresses the Exact issue you are referring to. Have a look.

    How to change the Server Header from "Apache-Coyote/1.1" with the CA API Management Gateway. 

     

    Regards,

    Neha



  • 8.  Re: How to control response headers

    Posted 05-18-2017 02:32 AM

    Thanks Neha, this resolved my requirement. 

     

    This way we don't have to touch any code.

     

    Regards

    Kareem