hdoc-tools 0.35.6 → 0.36.0
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/hdoc-validate.js +5 -2
- package/package.json +1 -1
package/hdoc-validate.js
CHANGED
@@ -344,7 +344,7 @@ const e = require("express");
|
|
344
344
|
)
|
345
345
|
redir_errors.push(`Invalid redirect code: ${redirects[key].code}`);
|
346
346
|
|
347
|
-
if (redirects[key].location) {
|
347
|
+
if (redirects[key].location && !redirects[key].skip_location_validation) {
|
348
348
|
const redir_locations = [
|
349
349
|
path.join(source_path, `${redirects[key].location}.md`),
|
350
350
|
path.join(source_path, redirects[key].location, "index.md"),
|
@@ -378,6 +378,9 @@ const e = require("express");
|
|
378
378
|
if (redirects[nav_path]) {
|
379
379
|
response.exists = true;
|
380
380
|
if (redirects[nav_path].location) {
|
381
|
+
|
382
|
+
if (redirects[nav_path].skip_location_validation) return response;
|
383
|
+
|
381
384
|
// We have a redirect, check if it's a valid location
|
382
385
|
let file_path = path.join(
|
383
386
|
source_path,
|
@@ -602,7 +605,7 @@ const e = require("express");
|
|
602
605
|
if ((status < 200 || status > 299) && status !== 304) {
|
603
606
|
if (status === 403 && links[i].includes(".hornbill.com")) {
|
604
607
|
// STEVEG - do nothing here, as it always returns a 403 for Hornbill sites when accessing through GitHub Actions
|
605
|
-
// Works totally fine locally or in hdocpub, still
|
608
|
+
// Works totally fine locally or in hdocpub, still trying to work out what's causing this in GitHub
|
606
609
|
} else {
|
607
610
|
throw `Unexpected Status Returned: ${status}`;
|
608
611
|
}
|