Showing posts from October, 2013

How to add additional headers to WSO2 API Manager Swagger Console

WSO2 API Manager has integrated Swagger to allow API consumers to explore APIs through a interactive console. When integrating Swagger with WSO2 API Manager we had to support CORS between API Store and the API Gateway. So in order to send any headers from Swagger, we need to add those required headers to the response coming from the API Gateway as 'Access-Control-Allow-Headers' . By default below set of headers are allowed to be send from swagger. authorization,Access-Control-Allow-Origin,Content-Type So if you need to add any additional headers to Swagger UI, then we should add that header to list of 'Access-Control-Allow-Headers'. There are 2 options to modify 'Access-Control-Allow-Headers'. 1. Modify the Synapse configuration of APIs and add modified set of headers to OutSequence. If you choose this method, you have to modify API configuration of each API and add the 'Access-Control-Allow-Headers'. For that go to Management Console of API