Setup CORS on Java Playframework 2.4.x + AngularJS -
i trying setup cors in java playframework 2.4.x withouth success. front-end app using angularjs 1.3.x.
i implemented filters class per documentation preflights options requests angularjs fail without apparent reason.
this application.conf values regarding filter:
note: edited domain names (i not owner of example.com) ;)
... play.filters.cors { allowedorigins = ["http://example.com", "http://beta.example.com", "http://example.com/beta"] allowedhttpmethods = ["get", "post", "put", "options", "delete"] allowedhttpheaders = ["accept", "content-type"] preflightmaxage = 3 days } ...
my play application hosted in separate server front-end: have sub-directory on main hosting containing angular app , subdomain pointing play server.
any ideas/suggestions on should investigate?
after 3 days struggling on understood problem. apparently module of cisco anyconnect vpn blocking options preflight requests.
nothing related play or angularjs.
here's link found solution: http://www.bennadel.com/blog/2559-cisco-anyconnect-vpn-client-may-block-cors-ajax-options-requests.htm
it enough uninstall client , boom! working again!
posting reference others might have same problem.
best, e.
Comments
Post a Comment