diff --git a/client/src/utils/FileUpload.tsx b/client/src/utils/FileUpload.tsx
index 256ffce..2dcdd78 100644
--- a/client/src/utils/FileUpload.tsx
+++ b/client/src/utils/FileUpload.tsx
@@ -6,6 +6,7 @@ export interface UploadResult {
error?: string;
}
+const whitelistImageURL = ["nostr.build", "void.cat", "blossom.oxtr"];
/**
* Upload file to void.cat
* https://void.cat/swagger/index.html
@@ -64,7 +65,7 @@ export const renderMedia = (files: string[]) => {
{files.map((file, index) => {
// Check if the file is from allowed domains
- const isFromAllowedDomain = file.includes("i.nostr.build") || file.includes("void.cat");
+ const isFromAllowedDomain = whitelistImageURL.some(domain => file.includes(domain));
if (file && (file.endsWith(".mp4") || file.endsWith(".webm"))) {
return (
diff --git a/client/src/utils/relays.ts b/client/src/utils/relays.ts
index 2b5ad88..a59c670 100644
--- a/client/src/utils/relays.ts
+++ b/client/src/utils/relays.ts
@@ -11,6 +11,8 @@ type Subscribe = {
unsub?: boolean;
};
+const blacklistUrl = ["lain.la", "casualcrypto.date"];
+
const subList: Array = [];
const currentSubList: Array = [];
const relayMap = new Map();
@@ -40,7 +42,9 @@ const subscribe = (
) => {
const sub = relay.subscribe([filter], {
onevent(event) {
- cb(event, relay.url);
+ if (!blacklistUrl.some(blacklistedUrl => event.content.includes(blacklistedUrl))) {
+ cb(event, relay.url);
+ }
},
});
subList.push(sub);