On Tue, Oct 10, 2017 at 6:26 PM, Renuka Fernando <[email protected]> wrote:

> Hi All,
>
> The feature “Multi Environment support with API difference for API
> Manager” (please refer the mail subject [1]) requires CORS support in
> MSF4J. Multi environments will running on different origins and UI client
> in one origin will make xhr requests to all other origins that environments
> have been deployed.
>
> Options to enable CORS to the above feature
>
>    1.
>
>    Enable the CORS support for MSF4J (already requested in #424
>    <https://github.com/wso2/msf4j/issues/424>)
>    2.
>
>    Have to change swagger2MSF4J
>    <https://github.com/sanjeewa-malalgoda/swagger2MSF4J> to have @OPTION
>    annotation method for all resources.
>    3.
>
>    OPTION method has to be defined in swagger for all resources
>
> Option one is more cleaner IMO and that is how other micro services
framework also support this. Option 2 will work for internal API
development as we use that plugin. But having core support is better than
support this in code generator level.

Thanks,
sanjeewa.

>
> Current version of Spring framework supports CORS [2].
>
> @CrossOrigin annotation enables cross origin requests only for this
> specific method and controller class level as well.
>
> annotation attributes
>
> origins, methods, allowedHeaders, exposedHeaders, allowCredentials, maxAge
> .
>
> Appreciate any comments for the best option.
>
> [1] [Dev] Environments Support for WSO2 API Manager
> [2] https://spring.io/guides/gs/rest-service-cors
>
> --
> *Renuka Fernando*
> Software Engineering Intern | WSO2 Inc
>
> Email : [email protected]
> Mobile : +94 76 667 8752 <076%20667%208752>
> Web : http://wso2.com
> <http://wso2.com/signature>
>



-- 

*Sanjeewa Malalgoda*
WSO2 Inc.
Mobile : +94713068779

<http://sanjeewamalalgoda.blogspot.com/>blog
:http://sanjeewamalalgoda.blogspot.com/
<http://sanjeewamalalgoda.blogspot.com/>
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to