@marvalt/wadapter 2.0.1 → 2.2.0
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.
package/dist/index.js
CHANGED
|
@@ -52,19 +52,7 @@ class WordPressClient {
|
|
|
52
52
|
'Content-Type': 'application/json',
|
|
53
53
|
};
|
|
54
54
|
// Add authentication based on mode
|
|
55
|
-
if (this.config.authMode === 'cloudflare_proxy')
|
|
56
|
-
// Add Cloudflare proxy authentication headers
|
|
57
|
-
if (this.config.appId) {
|
|
58
|
-
headers['x-app-id'] = this.config.appId;
|
|
59
|
-
}
|
|
60
|
-
if (this.config.workerSecret) {
|
|
61
|
-
headers['x-app-secret'] = this.config.workerSecret;
|
|
62
|
-
}
|
|
63
|
-
if (this.config.cfAccessClientId && this.config.cfAccessClientSecret) {
|
|
64
|
-
headers['CF-Access-Client-Id'] = this.config.cfAccessClientId;
|
|
65
|
-
headers['CF-Access-Client-Secret'] = this.config.cfAccessClientSecret;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
55
|
+
if (this.config.authMode === 'cloudflare_proxy') ;
|
|
68
56
|
else {
|
|
69
57
|
// Direct mode - use basic auth
|
|
70
58
|
if (this.config.username && this.config.password) {
|
|
@@ -298,19 +286,7 @@ class GravityFormsClient {
|
|
|
298
286
|
...options.headers,
|
|
299
287
|
};
|
|
300
288
|
// Add authentication based on mode
|
|
301
|
-
if (this.config.authMode === 'cloudflare_proxy')
|
|
302
|
-
// Add Cloudflare proxy authentication headers
|
|
303
|
-
if (this.config.appId) {
|
|
304
|
-
headers['x-app-id'] = this.config.appId;
|
|
305
|
-
}
|
|
306
|
-
if (this.config.workerSecret) {
|
|
307
|
-
headers['x-app-secret'] = this.config.workerSecret;
|
|
308
|
-
}
|
|
309
|
-
if (this.config.cfAccessClientId && this.config.cfAccessClientSecret) {
|
|
310
|
-
headers['CF-Access-Client-Id'] = this.config.cfAccessClientId;
|
|
311
|
-
headers['CF-Access-Client-Secret'] = this.config.cfAccessClientSecret;
|
|
312
|
-
}
|
|
313
|
-
}
|
|
289
|
+
if (this.config.authMode === 'cloudflare_proxy') ;
|
|
314
290
|
else {
|
|
315
291
|
// Direct mode - use basic auth
|
|
316
292
|
if (this.config.username && this.config.password) {
|