mirror of
https://git.sr.ht/~cadence/bibliogram
synced 2024-10-31 21:47:29 +00:00
FIx infinite loop
This commit is contained in:
parent
4e6ddcbcc8
commit
6a29419bff
4
package-lock.json
generated
4
package-lock.json
generated
@ -2738,8 +2738,8 @@
|
|||||||
"integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg=="
|
"integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg=="
|
||||||
},
|
},
|
||||||
"pinski": {
|
"pinski": {
|
||||||
"version": "github:cloudrac3r/pinski#6273f81facd1e753e021910f7aa6e4384cf60631",
|
"version": "github:cloudrac3r/pinski#64e588416e27da406711d853778dfcd729138397",
|
||||||
"from": "github:cloudrac3r/pinski#6273f81facd1e753e021910f7aa6e4384cf60631",
|
"from": "github:cloudrac3r/pinski#64e588416e27da406711d853778dfcd729138397",
|
||||||
"requires": {
|
"requires": {
|
||||||
"mime": "^2.4.4",
|
"mime": "^2.4.4",
|
||||||
"pug": "^2.0.3",
|
"pug": "^2.0.3",
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
"mixin-deep": "^2.0.1",
|
"mixin-deep": "^2.0.1",
|
||||||
"node-dir": "^0.1.17",
|
"node-dir": "^0.1.17",
|
||||||
"node-fetch": "^2.6.0",
|
"node-fetch": "^2.6.0",
|
||||||
"pinski": "github:cloudrac3r/pinski#6273f81facd1e753e021910f7aa6e4384cf60631",
|
"pinski": "github:cloudrac3r/pinski#64e588416e27da406711d853778dfcd729138397",
|
||||||
"pug": "^2.0.4",
|
"pug": "^2.0.4",
|
||||||
"semver": "^7.2.1",
|
"semver": "^7.2.1",
|
||||||
"sharp": "^0.25.2",
|
"sharp": "^0.25.2",
|
||||||
|
@ -2,9 +2,9 @@ const {render} = require("pinski/plugins")
|
|||||||
const constants = require("../../lib/constants")
|
const constants = require("../../lib/constants")
|
||||||
|
|
||||||
module.exports = [
|
module.exports = [
|
||||||
{route: "/404", methods: ["GET", "POST", "PATCH", "DELETE"], code: async ({url}) => {
|
{route: "/404", methods: ["*"], code: async ({url}) => {
|
||||||
const path = url.searchParams.get("pathname")
|
const path = url.searchParams.get("pathname")
|
||||||
const couldBeUsername = path.match(`^/${constants.external.username_regex}$`)
|
const couldBeUsername = path && path.match(`^/${constants.external.username_regex}(?:/channel)?$`)
|
||||||
return render(404, "pug/404.pug", {path, couldBeUsername})
|
return render(404, "pug/404.pug", {path, couldBeUsername})
|
||||||
}}
|
}}
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user