Enabling CORS

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Enabling CORS

Tyler Palsulich
Hi Folks,

I'm trying to enable CORS on a few of Tika's Server resources. But, after
adding the pom.xml dependency and a

    @CrossOriginResourceSharing(
        allowOrigins = {"url"}
    )

annotation to the resources, the Access-Control-Allow-Origin header is
still not given.

Is there another configuration I need to add? Tika's server doesn't
currently have a bean configuration like at the bottom of the examples page
<http://cxf.apache.org/docs/jax-rs-cors.html#JAX-RSCORS-Examples>.

Thanks for any help,
Tyler
Reply | Threaded
Open this post in threaded view
|

Re: Enabling CORS

Andriy Redko

Hi Tyler,

You need to add CrossOriginResourceSharingFilter to the list of providers for your server.
Please let me know if you need help with that, the way to add it depends on a way you configure the server.

Best Regards,
    Andriy Redko

TP> Hi Folks,

TP> I'm trying to enable CORS on a few of Tika's Server resources. But, after
TP> adding the pom.xml dependency and a

TP>     @CrossOriginResourceSharing(
TP>         allowOrigins = {"url"}
TP>     )

TP> annotation to the resources, the Access-Control-Allow-Origin header is
TP> still not given.

TP> Is there another configuration I need to add? Tika's server doesn't
TP> currently have a bean configuration like at the bottom of the examples page
TP> <http://cxf.apache.org/docs/jax-rs-cors.html#JAX-RSCORS-Examples>.

TP> Thanks for any help,
TP> Tyler

Reply | Threaded
Open this post in threaded view
|

Re: Enabling CORS

Tyler Palsulich
In reply to this post by Tyler Palsulich
Hi,

That worked! Thank you! I'll let you know if I have any more issues.

Tyler

On Fri, Mar 27, 2015 at 5:00 PM, Andriy Redko <[hidden email]> wrote:

>  Hi Tyler,
>
> You need to add CrossOriginResourceSharingFilter to the list of providers
> for your server.
> Please let me know if you need help with that, the way to add it depends
> on a way you configure the server.
>
> Best Regards,
>     Andriy Redko
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *TP> Hi Folks, TP> I'm trying to enable CORS on a few of Tika's Server
> resources. But, after TP> adding the pom.xml dependency and a TP>
> @CrossOriginResourceSharing( TP>         allowOrigins = {"url"} TP>     )
> TP> annotation to the resources, the Access-Control-Allow-Origin header is
> TP> still not given. TP> Is there another configuration I need to add?
> Tika's server doesn't TP> currently have a bean configuration like at the
> bottom of the examples page TP> <*
> http://cxf.apache.org/docs/jax-rs-cors.html#JAX-RSCORS-Examples
>
>
>
>
> *>. TP> Thanks for any help, TP> Tyler *
>