auto upgraded http to https

This commit is contained in:
Ren Amamiya 2023-04-21 17:52:10 +07:00
parent 8bf386ca9b
commit 2239606235
2 changed files with 8 additions and 2 deletions

View File

@ -93,7 +93,7 @@
}
},
"security": {
"csp": null
"csp": "upgrade-insecure-requests"
},
"updater": {
"active": true,

View File

@ -38,7 +38,9 @@ export const useProfileMetadata = (pubkey: string) => {
}, []);
useEffect(() => {
if (!cacheProfile) {
let ignore = false;
if (!cacheProfile && !ignore) {
fetchProfileMetadata(pubkey)
.then((res: any) => {
// update state
@ -48,6 +50,10 @@ export const useProfileMetadata = (pubkey: string) => {
})
.catch(console.error);
}
return () => {
ignore = true;
};
}, [cacheProfile, insertPlebToDB, pubkey]);
if (cacheProfile) {