Removed a lazy hack thats no longer needed due to an improved server-side config

This commit is contained in:
rainbow napkin 2026-07-03 01:54:55 -04:00
parent aa8658a06f
commit 96a6f5c0d2
3 changed files with 3 additions and 12 deletions

View file

@ -9,7 +9,7 @@ Canopy
<a href="https://git.ourfore.st/rainbownapkin/canopy/issues" target="_blank"><img src="https://git.ourfore.st/rainbownapkin/canopy/badges/issues/closed.svg"></a> <a href="https://git.ourfore.st/rainbownapkin/canopy/issues" target="_blank"><img src="https://git.ourfore.st/rainbownapkin/canopy/badges/issues/closed.svg"></a>
<a href="https://www.gnu.org/licenses/agpl-3.0.en.html" target="_blank"><img src="https://img.shields.io/badge/License-AGPL_v3-663366.svg"></a> <a href="https://www.gnu.org/licenses/agpl-3.0.en.html" target="_blank"><img src="https://img.shields.io/badge/License-AGPL_v3-663366.svg"></a>
0.1-Alpha (Panama Red) - Hotfix 3 0.1-Alpha (Panama Red) - Hotfix 4
========= =========
Canopy - /ˈkæ.nə.pi/: Canopy - /ˈkæ.nə.pi/:

View file

@ -1,7 +1,7 @@
{ {
"name": "canopy-of-alpha", "name": "canopy-of-alpha",
"version": "0.1.3", "version": "0.1.4",
"canopyDisplayVersion": "0.1-Alpha (Panama Red) - Hotfix 3", "canopyDisplayVersion": "0.1-Alpha (Panama Red) - Hotfix 4",
"license": "AGPL-3.0-only", "license": "AGPL-3.0-only",
"dependencies": { "dependencies": {
"@braintree/sanitize-url": "^7.1.1", "@braintree/sanitize-url": "^7.1.1",

View file

@ -35,15 +35,6 @@ module.exports.cache = new Map();
module.exports.markLink = async function(dirtyLink){ module.exports.markLink = async function(dirtyLink){
const link = sanitizeUrl(dirtyLink); const link = sanitizeUrl(dirtyLink);
//If this link is referencing this web server
if(link.match(new RegExp(`^${config.protocol}://${config.domain}`)) != null){
//Lazily return it as a good link, since we know it'll at least return a good 404 page XP
return {
link,
type: "link"
}
}
//Check link cache for the requested link //Check link cache for the requested link
const cachedLink = module.exports.cache.get(link); const cachedLink = module.exports.cache.get(link);