godprotocol 2.2.85 → 2.2.87
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
CHANGED
|
@@ -139,7 +139,7 @@ class Headers extends Services {
|
|
|
139
139
|
return res;
|
|
140
140
|
};
|
|
141
141
|
|
|
142
|
-
validate_third_party = async (xplatform, authorization) => {
|
|
142
|
+
validate_third_party = async (xplatform, authorization, request) => {
|
|
143
143
|
const db = await this.platform_db();
|
|
144
144
|
|
|
145
145
|
const query = {
|
|
@@ -221,6 +221,9 @@ class Headers extends Services {
|
|
|
221
221
|
handle_security = async (name, request) => {
|
|
222
222
|
let route = await this.get_route(name);
|
|
223
223
|
|
|
224
|
+
if (!route) {
|
|
225
|
+
route = await this.get_route("*");
|
|
226
|
+
}
|
|
224
227
|
if (!route?.config?.security?.length) return true;
|
|
225
228
|
|
|
226
229
|
if (!this.check_security(route.config.security, request)) {
|
|
@@ -244,6 +247,7 @@ class Headers extends Services {
|
|
|
244
247
|
val = await this.validate_third_party(
|
|
245
248
|
xplatform || this.platform_uri,
|
|
246
249
|
authorisation,
|
|
250
|
+
request,
|
|
247
251
|
);
|
|
248
252
|
} else if (route.config.security?.includes("api_key")) {
|
|
249
253
|
val = await this.validate_api_key(api_key, authorisation);
|