Skip to content

Commit

Permalink
Merge pull request #249 from nih-sparc/stop-recursive-indexing-in-header
Browse files Browse the repository at this point in the history
Stop recursive indexing from header
  • Loading branch information
egauzens authored Jan 14, 2025
2 parents 0b1a05e + 11cc32c commit 7eb2e47
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions components/Header/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,11 @@ export default {
}
return path.substring(0, endIndex)
},
currentUrl: function() {
return encodeURIComponent(this.$route.fullPath)
currentUrl: function () {
const config = useRuntimeConfig()
const url = new URL(this.$route.fullPath, config.public.ROOT_URL)
url.searchParams.delete('source_url') // Remove existing source_url in order to prevent indexing recursion
return encodeURIComponent(url.pathname + url.search)
},
},
Expand Down

0 comments on commit 7eb2e47

Please sign in to comment.