@@ -10296,15 +10296,23 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
1029610296 return promise ;
1029710297 } ;
1029810298
10299- var setHeaders = function setHeaders ( sessionToken ) {
10299+ var setHeaders = function setHeaders ( sessionToken , signKey ) {
1030010300 var headers = {
1030110301 'X-LC-Id' : AV . applicationId ,
1030210302 'Content-Type' : 'application/json;charset=UTF-8'
1030310303 } ;
1030410304 if ( AV . masterKey && AV . _useMasterKey ) {
10305- headers [ 'X-LC-Sign' ] = sign ( AV . masterKey , true ) ;
10305+ if ( signKey ) {
10306+ headers [ 'X-LC-Sign' ] = sign ( AV . masterKey , true ) ;
10307+ } else {
10308+ headers [ 'X-LC-Key' ] = AV . masterKey + ",master" ;
10309+ }
1030610310 } else {
10307- headers [ 'X-LC-Sign' ] = sign ( AV . applicationKey ) ;
10311+ if ( signKey ) {
10312+ headers [ 'X-LC-Sign' ] = sign ( AV . applicationKey ) ;
10313+ } else {
10314+ headers [ 'X-LC-Key' ] = AV . applicationKey ;
10315+ }
1030810316 }
1030910317 if ( AV . _config . applicationProduction !== null ) {
1031010318 headers [ 'X-LC-Prod' ] = AV . _config . applicationProduction ;
@@ -10506,7 +10514,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
1050610514 }
1050710515 return getServerURLPromise . then ( function ( ) {
1050810516 var apiURL = createApiUrl ( route , className , objectId , method , dataObject ) ;
10509- return setHeaders ( sessionToken ) . then ( function ( headers ) {
10517+ return setHeaders ( sessionToken , route !== 'bigquery' ) . then ( function ( headers ) {
1051010518 return ajax ( method , apiURL , dataObject , headers ) . then ( null , function ( res ) {
1051110519 return handleError ( res ) . then ( function ( location ) {
1051210520 return ajax ( method , location , dataObject , headers ) ;
@@ -13098,6 +13106,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
1309813106 * Each engineer has a duty to keep the code elegant
1309913107 **/
1310013108
13101- module . exports = 'js1.5.0 ' ;
13109+ module . exports = 'js1.5.1 ' ;
1310213110 } , { } ] } , { } , [ 27 ] ) ( 27 ) ;
1310313111} ) ;
0 commit comments