godprotocol 2.3.37 → 2.3.39
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/package.json +1 -1
- package/server/Routable/Header.js +10 -2
package/package.json
CHANGED
|
@@ -75,6 +75,13 @@ class DB {
|
|
|
75
75
|
toSet.expiry = new Date(payload.expiry);
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
+
if (payload?.profile?._id) {
|
|
79
|
+
toSet.profile_id = payload.profile._id;
|
|
80
|
+
}
|
|
81
|
+
if (payload?.platform?._id) {
|
|
82
|
+
toSet.platform_id = payload.platform._id;
|
|
83
|
+
}
|
|
84
|
+
|
|
78
85
|
res = await coll.updateOne(
|
|
79
86
|
query,
|
|
80
87
|
{
|
|
@@ -201,7 +208,8 @@ class Headers extends Services {
|
|
|
201
208
|
version: this.gp.__gp_version,
|
|
202
209
|
});
|
|
203
210
|
|
|
204
|
-
let third_party =
|
|
211
|
+
let third_party =
|
|
212
|
+
xplatform !== this.platform_uri && !this.gp?.server?.domain.endsWith(hst);
|
|
205
213
|
|
|
206
214
|
// if (gp_profile.url.endsWith(hst)) {
|
|
207
215
|
// headers["x-platform"] = xplatform;
|
|
@@ -212,7 +220,7 @@ class Headers extends Services {
|
|
|
212
220
|
third_party ? { from: xplatform } : {},
|
|
213
221
|
{
|
|
214
222
|
token: authorization,
|
|
215
|
-
xplatform,
|
|
223
|
+
xplatform: third_party ? this.platform_uri : xplatform,
|
|
216
224
|
api_version: "identity:v3",
|
|
217
225
|
},
|
|
218
226
|
);
|