java - Cross domain access with Jax-RS -
is enough allow other domain access resource:
@override public response signin() { //acao = access-control-allow-origin response resp = response.ok("{ 'login' : 'ok'}").header(acao, "*").build(); return resp; }
in case better use tested implementation. adam bien released library allow cross domain access jax-rs applications. se blog post here: cors jax-rs 2.0 / java ee 7 released
Comments
Post a Comment