aboutsummaryrefslogtreecommitdiff
path: root/brokenlinks_worker.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2025-06-01 16:02:46 +0700
committerShulhan <ms@kilabit.info>2025-06-01 16:02:46 +0700
commitff0fb55d60f4c29ffb6b8a69c2be3469f794990a (patch)
treea3a28c2b1fe241dc1378e237407a2db1cb433779 /brokenlinks_worker.go
parent19b2e2d1ac0fd8a88af6b0da3d00017e4ee31c06 (diff)
downloadjarink-ff0fb55d60f4c29ffb6b8a69c2be3469f794990a.tar.xz
all: brokenlinks should scan only URL on given path
Previously, if we pass the URL with path to brokenlinks, for example "web.tld/path" it will scan all of the pages in the website "web.tld". Now, it only scan the "/path" and its sub paths.
Diffstat (limited to 'brokenlinks_worker.go')
-rw-r--r--brokenlinks_worker.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/brokenlinks_worker.go b/brokenlinks_worker.go
index a196d2f..5cc8c25 100644
--- a/brokenlinks_worker.go
+++ b/brokenlinks_worker.go
@@ -303,7 +303,7 @@ func (wrk *brokenlinksWorker) scan(linkq linkQueue) {
}
_, seen := resultq[nodeLink.url]
if !seen {
- if !strings.HasPrefix(nodeLink.url, wrk.baseUrl.String()) {
+ if !strings.HasPrefix(nodeLink.url, wrk.scanUrl.String()) {
nodeLink.isExternal = true
}
resultq[nodeLink.url] = *nodeLink