@tinypudding/puddy-lib
Advanced tools
Comparing version 1.1.10 to 1.1.11
@@ -7,3 +7,3 @@ module.exports = function (req, cfg) { | ||
// Start Domain Verification | ||
let domainStatus = { verified: false, domain: checkDomain.get(req) }; | ||
let domainStatus = { verified: false, domain: checkDomain.get(req), isStaticPath: false }; | ||
@@ -14,7 +14,7 @@ // Path | ||
for (const item in prepareUrlPath) { | ||
if(Number(item) > 0) { | ||
if (Number(item) > 0) { | ||
// Insert URL Path | ||
req.url_path.push(prepareUrlPath[item].split(/[?#]/)[0]); | ||
} | ||
@@ -34,3 +34,3 @@ } | ||
firebaseIsEmulator = require('@tinypudding/firebase-lib/isEmulator')(); | ||
} catch(err) { | ||
} catch (err) { | ||
firebaseIsEmulator = false; | ||
@@ -54,2 +54,17 @@ } | ||
// is Valid | ||
if (domainStatus.verified) { | ||
// Validate Static Path | ||
if (Array.isArray(cfg.staticPath)) { | ||
for (const item in cfg.staticPath) { | ||
if (typeof cfg.staticPath[item] === "string" && req.url.startsWith(cfg.staticPath[item])) { | ||
domainStatus.isStaticPath = true; | ||
break; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
@@ -56,0 +71,0 @@ |
{ | ||
"name": "@tinypudding/puddy-lib", | ||
"version": "1.1.10", | ||
"version": "1.1.11", | ||
"description": "Essential codes to run the other repositories from the Tiny Pudding Account.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
60833
821