Only add the client tag if the page is served over https

This commit is contained in:
Alex Gleason 2025-06-07 16:32:28 -05:00
parent c2d5187efb
commit 641f570329
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7

View File

@ -15,7 +15,7 @@ export function useNostrPublish(): UseMutationResult<NostrEvent> {
const tags = t.tags ?? [];
// Add the client tag if it doesn't exist
if (!tags.some((tag) => tag[0] === "client")) {
if (location.protocol === "https:" && !tags.some(([name]) => name === "client")) {
tags.push(["client", location.hostname]);
}