pixl-xyapp 2.1.23 → 2.1.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/js/base.js +6 -0
  2. package/package.json +1 -1
package/js/base.js CHANGED
@@ -298,6 +298,12 @@ var app = {
298
298
  // send HTTP GET to API endpoint
299
299
  // Debug.trace('api', "Sending API request: " + url );
300
300
 
301
+ // add csrf token if we have one
302
+ if (app.csrf_token && (opts.method == 'POST')) {
303
+ if (!opts.headers) opts.headers = {};
304
+ opts.headers['X-CSRF-Token'] = app.csrf_token;
305
+ }
306
+
301
307
  // default 10 sec timeout
302
308
  var timeout = opts.timeout || 10000;
303
309
  delete opts.timeout;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pixl-xyapp",
3
- "version": "2.1.23",
3
+ "version": "2.1.24",
4
4
  "description": "Front-end web application and theme for xyOps.",
5
5
  "author": "Joseph Huckaby <jhuckaby@pixlcore.com>",
6
6
  "homepage": "https://github.com/pixlcore/pixl-xyapp",