You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't seem to make JSNLog work and maybe I'm missing something obvious.
I have an Angular 5 front-end and a separate API server backend in Django.
I have basically followed the instructions here: http://jsnlog.com/Documentation/HowTo/Angular2Logging
and used JL.setOptions with defaultAjaxUrl pointing to my django API endpoint. I just wanted to check what's being sent.
I then throw an error somewhere on my UI interactions to see whats going on.
But all that happens is my endpoint being hit with an endless stream of OPTIONS xhr requests. No POST is ever sent and the OPTIONS are unceasing either.
What am I doing wrong?
The text was updated successfully, but these errors were encountered:
Late reply I guess, but if your URL is on a different server, Chrome will do a pre-flight Options request prior to letting the POST go. You need to respond to it. If you want any cross-domain Options request to pass, just add these headers to the options response on the server side:
And the request should pass. You'd do this in whatever the end point handler is on the server. in Java you'd override the doOptions() method on a HttpServlet for example.
Hi there,
I can't seem to make JSNLog work and maybe I'm missing something obvious.
I have an Angular 5 front-end and a separate API server backend in Django.
I have basically followed the instructions here: http://jsnlog.com/Documentation/HowTo/Angular2Logging
and used JL.setOptions with defaultAjaxUrl pointing to my django API endpoint. I just wanted to check what's being sent.
I then throw an error somewhere on my UI interactions to see whats going on.
But all that happens is my endpoint being hit with an endless stream of OPTIONS xhr requests. No POST is ever sent and the OPTIONS are unceasing either.
What am I doing wrong?
The text was updated successfully, but these errors were encountered: