Hi All,

The above requirement for the feature "Multi-Environment Support" for API
Manager 3.0.0 is resolved by reading the swagger definition [1]. Defined
HTTP methods for the resource path is read from the swagger file and set it
to the “Access-Control-Allow-Methods” header.

[1]
https://github.com/wso2/carbon-apimgt/pulhttps://github.com/wso2/carbon-apimgt/pull/5095l/5095
<https://github.com/wso2/carbon-apimgt/pull/5095>

Thanks and regards

On 22 November 2017 at 15:11, Renuka Fernando <ren...@wso2.com> wrote:

> Hi All,
>
> The feature “Environment Support” for API Manager requires making CORS
> requests.
>
> In CORS preflight requests browser sends request method with “
> Access-Control-Request-Method” header. The server should respond allowed
> HTTP methods with “Access-Control-Allow-Methods” header. In order to set
> the header, the request method should be validated by checking whether
> the request method is within HTTP methods associated with the resource path.
>
> In interceptor level these http methods (http methods associate with the
> resource path) are not accessible.
>
> org.wso2.msf4j.Interceptor
>
> preCall method.
>
> response.setHeader("Access-Control-Allow-Methods", allowedMethods);
>
> These http methods can be found in org.wso2.msf4j.internal.
> MSF4JMessageProcessor dispatchMethod method.
>
> resourceModel.httpMethods
>
> Can the preCall method in org.wso2.msf4j.Interceptor to be improved to
> extract Http-Methods associate with the Resource-Path in interceptor level.
>
> Regards,
>
> --
> *Renuka Fernando*
> Software Engineering Intern | WSO2 Inc
>
> Email : ren...@wso2.com
> Mobile : +94 76 667 8752 <+94%2076%20667%208752>
> Web : http://wso2.com
> <http://wso2.com/signature>
>



-- 
*Renuka Fernando*
Software Engineering Intern | WSO2 Inc

Email : ren...@wso2.com
Mobile : +94 76 667 8752
Web : http://wso2.com
<http://wso2.com/signature>
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to