zlaja
zlaja

Reputation: 1363

AngularJS RESTful over SSL

I have a problem with RESTful service call over SSL in AngularJS application, it is a POST call. In Chrome's inspector I can see OPTION call where column status has value Canceled and column Type has value Pending.

At a server side I get error: default-akka.actor.default-dispatcher-7, fatal error: 80: Inbound closed before receiving peer's close_notify: possible truncation attack? javax.net.ssl.SSLException: Inbound closed before receiving peer's close_notify: possible truncation attack?

If I execute a POST request from Chrome's plugin Poster it works fine. Also, it works fine if I turn off ssl and use http insteadof https. It also works if I create html page with submit to https url.

Thanks for any idea.

Zlaja

Upvotes: 2

Views: 4410

Answers (1)

Mike Driver
Mike Driver

Reputation: 8511

is it trying to do a POST cross-origin?

A POST to the same origin should not result in an OPTIONS pre-flight query. So it sounds like you may be having an issue that the OPTIONS query isn't returning the correct headers.

This would also be a reason why Chrome's Poster plugin works fine because it's a plugin and specifically bypasses the usual Cross-origin security protection for debugging purposes.

Have a look at cross origin (CORS) information here:

http://www.html5rocks.com/en/tutorials/cors/

Upvotes: 2

Related Questions