Hi,

On 14 January 2015 at 00:32, Joseph Fonseka <jos...@wso2.com> wrote:

> Hi
>
> With related to CORS the headers they should be set in the gateway as well
> since we are configuring CORS in gateway so the headers should be as the
> configuration of the gateway not the back-end.
>

+1. OPTIONS verb exposed through API Gateway should return the supported
headers of the relevant resource in the API Gateway. If the back-end
supports all the HTTP verbs, but mapped API resource only supports GET,
then returning allowed methods of the back-end in not correct.


Thanks,
Lakmali

>
> Also we can capture allowed domains per API basis. Allowed methods and
> headers are already captured in API definition.
>
> Regards
> Jo
>
> On Tue, Jan 13, 2015 at 3:37 PM, Sanjeewa Malalgoda <sanje...@wso2.com>
> wrote:
>
>>
>>
>> On Tue, Jan 13, 2015 at 11:40 AM, Joseph Fonseka <jos...@wso2.com> wrote:
>>
>>>
>>> Hi
>>>
>>> Currently in API Manager we send the OPTIONS call to the back-end server
>>> to respond. But if the API does not expose all the HTTP methods in
>>> back-end, OPTIONS call response will be invalid.
>>>
>>> 1. Should we respond to the OPTIONS call from the gateway with the Allow
>>> header including only the HTTP methods exposed by the API.
>>>
>> When we consider CORS use cases preflight call happens as OPTIONS call.
>> So shouldn't we pass them to back end without doing something in gateway?
>> IMO this should be configurable via some kind of configuration. And it
>> would be ideal if we can do this per API level without having global
>> parameter to all APIs in system
>>
>> Thanks,
>> sanjeewa.
>>
>>>
>>> 2. If we are doing above should we give an option to the user to
>>> override in case if he want to send it to back-end.
>>>
>>> 3. Is there a valid requirement to show the OPTIONS method in API Design
>>> phase, shouldn't it be enabled by default.
>>>
>>> Thanks
>>> Jo
>>>
>>> Related
>>> https://wso2.org/jira/browse/APIMANAGER-1704
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> --
>>> *Joseph Fonseka*
>>>  WSO2 Inc.; http://wso2.com
>>> lean.enterprise.middleware
>>>
>>> mobile: +94 772 512 430
>>> skype: jpfonseka
>>>
>>> * <http://lk.linkedin.com/in/rumeshbandara>*
>>>
>>>
>>
>>
>> --
>>
>> *Sanjeewa Malalgoda*
>> WSO2 Inc.
>> Mobile : +94713068779
>>
>>  <http://sanjeewamalalgoda.blogspot.com/>blog
>> :http://sanjeewamalalgoda.blogspot.com/
>> <http://sanjeewamalalgoda.blogspot.com/>
>>
>>
>>
>
>
> --
>
> --
> *Joseph Fonseka*
>  WSO2 Inc.; http://wso2.com
> lean.enterprise.middleware
>
> mobile: +94 772 512 430
> skype: jpfonseka
>
> * <http://lk.linkedin.com/in/rumeshbandara>*
>
>


-- 
Lakmali Baminiwatta
 Senior Software Engineer
WSO2, Inc.: http://wso2.com
lean.enterprise.middleware
mobile:  +94 71 2335936
blog : lakmali.com
_______________________________________________
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to