@base44-preview/sdk 0.8.3-pr.40.f27d5be → 0.8.4-pr.43.a6c7baf
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/client.js +6 -0
- package/package.json +1 -1
package/dist/client.js
CHANGED
|
@@ -172,6 +172,7 @@ export function createClientFromRequest(request) {
|
|
|
172
172
|
const appId = request.headers.get("Base44-App-Id");
|
|
173
173
|
const serverUrlHeader = request.headers.get("Base44-Api-Url");
|
|
174
174
|
const functionsVersion = request.headers.get("Base44-Functions-Version");
|
|
175
|
+
const userCountry = request.headers.get("Base44-User-Country");
|
|
175
176
|
if (!appId) {
|
|
176
177
|
throw new Error("Base44-App-Id header is required, but is was not found on the request");
|
|
177
178
|
}
|
|
@@ -194,7 +195,12 @@ export function createClientFromRequest(request) {
|
|
|
194
195
|
}
|
|
195
196
|
userToken = authHeader.split(" ")[1];
|
|
196
197
|
}
|
|
198
|
+
const forwardHeaders = {};
|
|
199
|
+
if (userCountry) {
|
|
200
|
+
forwardHeaders["Base44-User-Country"] = userCountry;
|
|
201
|
+
}
|
|
197
202
|
return createClient({
|
|
203
|
+
headers: forwardHeaders,
|
|
198
204
|
serverUrl: serverUrlHeader || "https://base44.app",
|
|
199
205
|
appId,
|
|
200
206
|
token: userToken,
|