diff --git a/dist/lib/be5-react.js b/dist/lib/be5-react.js index 13f43b46..0638dde3 100644 --- a/dist/lib/be5-react.js +++ b/dist/lib/be5-react.js @@ -261,7 +261,7 @@ var getDefaultRoute = function getDefaultRoute(state) { return state.user.defaultRoute; }; -var API_URL_PREFIX = '/api/'; +var API_URL_PREFIX = 'api/'; var DEFAULT_VIEW = 'All records'; @@ -459,6 +459,7 @@ var be5 = { DOCUMENT_REFRESH_SUFFIX: "_refresh", appInfo: {}, + serverUrlWithContext: window.serverUrlWithContext || "/", locale: { set: function set$$1(loc, addMessages) { @@ -654,7 +655,7 @@ var be5 = { }; $.ajax({ - url: url, + url: be5.serverUrlWithContext + url, dataType: type, type: 'POST', data: params, diff --git a/package.json b/package.json index df76c753..27af925a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "be5-react", - "version": "0.2.22", + "version": "0.2.29", "description": "React client UI for be5 server api", "main": "dist/lib/be5-react.js", "scripts": { diff --git a/src/scripts/be5/be5.js b/src/scripts/be5/be5.js index f2d6d64e..a4129326 100644 --- a/src/scripts/be5/be5.js +++ b/src/scripts/be5/be5.js @@ -25,6 +25,7 @@ const be5 = { DOCUMENT_REFRESH_SUFFIX: "_refresh", appInfo: {}, + serverUrlWithContext: window.serverUrlWithContext || "/", locale: { set(loc, addMessages) { @@ -230,7 +231,7 @@ const be5 = { }; $.ajax({ - url : url, + url : be5.serverUrlWithContext + url, dataType : type, type : 'POST', data : params, diff --git a/src/scripts/be5/constants.js b/src/scripts/be5/constants.js index b3967738..f9def0a7 100644 --- a/src/scripts/be5/constants.js +++ b/src/scripts/be5/constants.js @@ -1,4 +1,4 @@ -export const API_URL_PREFIX = '/api/'; +export const API_URL_PREFIX = 'api/'; export const DEFAULT_VIEW = 'All records';