You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by GB <ga...@gmail.com> on 2017/01/23 17:29:09 UTC

Re: Jetty configuration for adding new Handler

Hi Andry/Saurabh,

I also have same issue as in original post.
I tried exact steps as mentioned by Andry but still facing same issue.
Header "Access-Control-Allow-Origin" is still not set in the response. Does
anything else needed in Jetty Configuration other than what Andry mentioned?

Thanks a lot.





--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Jetty-configuration-for-adding-new-Handler-tp5841p10197.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Jetty configuration for adding new Handler

Posted by Gaurav Bajaj <ga...@gmail.com>.
Hello Andrey/Saurabh,

I could get it working with following additions in the jetty configuration :

<Set name="handler">
    <New id="RewriteHandler"
class="org.eclipse.jetty.rewrite.handler.RewriteHandler">
<Set name="rules">
<Array type="org.eclipse.jetty.rewrite.handler.Rule">
<Item>
<New id="header"
class="org.eclipse.jetty.rewrite.handler.HeaderPatternRule">
<Set name="pattern">/</Set>
<Set name="name">Access-Control-Allow-Origin</Set>
<Set name="value">*</Set>
</New>
</Item>
<Item>
<New id="header"
class="org.eclipse.jetty.rewrite.handler.HeaderPatternRule">
<Set name="pattern">/</Set>
<Set name="name">Access-Control-Allow-Methods</Set>
<Set name="value">GET,POST</Set>
</New>
</Item>
</Array>
  </Set>
        </New>
    </Set>

Basically had to add "Access-Control-Allow-Methods" too.

Thanks,
Gaurav


On Mon, Jan 23, 2017 at 6:29 PM, GB <ga...@gmail.com> wrote:

> Hi Andry/Saurabh,
>
> I also have same issue as in original post.
> I tried exact steps as mentioned by Andry but still facing same issue.
> Header "Access-Control-Allow-Origin" is still not set in the response. Does
> anything else needed in Jetty Configuration other than what Andry
> mentioned?
>
> Thanks a lot.
>
>
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/Jetty-configuration-for-adding-new-
> Handler-tp5841p10197.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>