angular - Where to put / configure CORS header Access-Control-Expose-Headers in WSO2 API Manager -
i having problem accessing response headers under cors scenario. doing cors call. so, configured api configuration in api manager accept cors requests (that is, cors enabled rest endpoint).
but when app (angular2 app) post request (http.post) not see response headers. checked in chrome devtools browser receiving remote server , turned out expected response headers received in browser. apparently, angular not pass code , not able access headers. gunter, suggested me check cors header
access-control-expose-headers
my question: can tell wso2 api manager pass pass or set header when cors enabled? tried in api-manager.xml did not see expected header (in case header 'location') after restart.
angular2 's http.post not returning headers in response of post method invocation
apim out-of-the-box supports access-control-allow-headers
not access-control-expose-headers
.
but can configure apim send header well. that, create sequence below , attach api.
<sequence xmlns="http://ws.apache.org/ns/synapse" name="_cors_request_handler_"> <property name="access-control-expose-headers" value="location" scope="transport" type="string"/> </sequence>
this doc explains how engage such sequence file particular api or globally apis.
Comments
Post a Comment