Skip to content

Commit ca03617

Browse files
committed
Request '/serverup' synchronously to ensure cookies get set
1 parent 6cb4999 commit ca03617

File tree

1 file changed

+6
-1
lines changed
  • corehq/apps/cloudcare/static/cloudcare/js/formplayer

1 file changed

+6
-1
lines changed

corehq/apps/cloudcare/static/cloudcare/js/formplayer/app.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,12 @@ hqDefine("cloudcare/js/formplayer/app", function () {
2323
FormplayerFrontend.on("before:start", function (app, options) {
2424
// Make a get call if the csrf token isn't available when the page loads.
2525
if ($.cookie('XSRF-TOKEN') === undefined) {
26-
$.get({url: options.formplayer_url + '/serverup', global: false, xhrFields: { withCredentials: true }});
26+
$.get({
27+
url: options.formplayer_url + '/serverup',
28+
global: false,
29+
async: false,
30+
xhrFields: { withCredentials: true },
31+
});
2732
}
2833
var RegionContainer = Marionette.View.extend({
2934
el: "#menu-container",

0 commit comments

Comments
 (0)