We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 10fa73c commit dbad989Copy full SHA for dbad989
src/request.js
@@ -105,7 +105,13 @@ const setHeaders = (authOptions = {}) => {
105
'X-LC-Id': AV.applicationId,
106
'Content-Type': 'application/json;charset=UTF-8',
107
};
108
- if (AV._useMasterKey || authOptions.useMasterKey) {
+ let useMasterKey = false;
109
+ if (typeof authOptions.useMasterKey === 'boolean') {
110
+ useMasterKey = authOptions.useMasterKey;
111
+ } else if (typeof AV._useMasterKey === 'boolean') {
112
+ useMasterKey = AV._useMasterKey;
113
+ }
114
+ if (useMasterKey) {
115
if (AV.masterKey) {
116
headers['X-LC-Sign'] = sign(AV.masterKey, true);
117
} else {
0 commit comments