template v3: use CF Worker proxy for GHL API key (no exposed secrets)

This commit is contained in:
Jake Shore 2026-02-13 21:21:07 -05:00
parent 5c5f772910
commit 7b01d72f58
3 changed files with 9 additions and 30 deletions

View File

@ -830,17 +830,10 @@
if (email) body.email = email;
if (!body.name) body.name = firstName + ' ' + lastName;
const res = await fetch('https://services.leadconnectorhq.com/contacts/', {
const res = await fetch('https://mcpengage-waitlist.jake-2ab.workers.dev', {
method: 'POST',
headers: {
'Authorization': 'Bearer pit-0480982f-750b-4baa-bc10-1340a9b2102b',
'Content-Type': 'application/json',
'Version': '2021-07-28'
},
body: JSON.stringify({
...body,
locationId: 'DZEpRd43MxUJKdtrev9t'
})
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(body)
});
if (res.ok || res.status === 200 || res.status === 201) {

View File

@ -830,17 +830,10 @@
if (email) body.email = email;
if (!body.name) body.name = firstName + ' ' + lastName;
const res = await fetch('https://services.leadconnectorhq.com/contacts/', {
const res = await fetch('https://mcpengage-waitlist.jake-2ab.workers.dev', {
method: 'POST',
headers: {
'Authorization': 'Bearer pit-0480982f-750b-4baa-bc10-1340a9b2102b',
'Content-Type': 'application/json',
'Version': '2021-07-28'
},
body: JSON.stringify({
...body,
locationId: 'DZEpRd43MxUJKdtrev9t'
})
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(body)
});
if (res.ok || res.status === 200 || res.status === 201) {

View File

@ -830,17 +830,10 @@
if (email) body.email = email;
if (!body.name) body.name = firstName + ' ' + lastName;
const res = await fetch('https://services.leadconnectorhq.com/contacts/', {
const res = await fetch('https://mcpengage-waitlist.jake-2ab.workers.dev', {
method: 'POST',
headers: {
'Authorization': 'Bearer pit-0480982f-750b-4baa-bc10-1340a9b2102b',
'Content-Type': 'application/json',
'Version': '2021-07-28'
},
body: JSON.stringify({
...body,
locationId: 'DZEpRd43MxUJKdtrev9t'
})
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(body)
});
if (res.ok || res.status === 200 || res.status === 201) {