Log unsigned events
This commit is contained in:
parent
d87e516ffa
commit
15fcaf1279
2 changed files with 4 additions and 2 deletions
|
|
@ -112,5 +112,5 @@
|
||||||
"throttle-debounce": "^5.0.2",
|
"throttle-debounce": "^5.0.2",
|
||||||
"tippy.js": "^6.3.7"
|
"tippy.js": "^6.3.7"
|
||||||
},
|
},
|
||||||
"packageManager": "pnpm@11.22.0"
|
"packageManager": "pnpm@11.25.0"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ import {
|
||||||
makeAppPolicyAuth,
|
makeAppPolicyAuth,
|
||||||
} from "@welshman/app"
|
} from "@welshman/app"
|
||||||
import type {AppPolicy, IApp} from "@welshman/app"
|
import type {AppPolicy, IApp} from "@welshman/app"
|
||||||
import {app, appPolicies} from "@app/core"
|
import {app, logger, appPolicies} from "@app/core"
|
||||||
import {BLOCKED_RELAYS} from "@app/env"
|
import {BLOCKED_RELAYS} from "@app/env"
|
||||||
import {userSettingsValues, getSetting, RelayAuthMode} from "@app/settings"
|
import {userSettingsValues, getSetting, RelayAuthMode} from "@app/settings"
|
||||||
|
|
||||||
|
|
@ -106,6 +106,8 @@ const trustPolicy = (socket: Socket) => {
|
||||||
// the receive queue. If trust status is undefined, buffer it for later.
|
// the receive queue. If trust status is undefined, buffer it for later.
|
||||||
on(socket, SocketEvent.Receiving, (message: RelayMessage) => {
|
on(socket, SocketEvent.Receiving, (message: RelayMessage) => {
|
||||||
if (isRelayEvent(message) && !message[2]?.sig) {
|
if (isRelayEvent(message) && !message[2]?.sig) {
|
||||||
|
logger.get().log("trustPolicy", {url: socket.url, message})
|
||||||
|
|
||||||
const isTrusted = getSetting("trusted_relays").includes(socket.url)
|
const isTrusted = getSetting("trusted_relays").includes(socket.url)
|
||||||
|
|
||||||
if (!isTrusted) {
|
if (!isTrusted) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue