From 7be98978dd2b492b4aad4b38f9289e1b45939132 Mon Sep 17 00:00:00 2001 From: Yury Date: Wed, 29 May 2024 17:03:00 +0300 Subject: [PATCH 1/3] fix(Offline): fixed 0.0.0.0 host --- src/App.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/App.tsx b/src/App.tsx index 149bddb..7d8744c 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -16,6 +16,10 @@ const App = () => { const authState = useSelector((state: State) => state.auth) useEffect(() => { + if (window.location.hostname === '0.0.0.0') { + window.location.hostname = 'localhost' + } + generateBunkerDelegatedKey() const authController = new AuthController() From f041370c62a1904958256c5d54cb42910c58b273 Mon Sep 17 00:00:00 2001 From: Yury Date: Wed, 29 May 2024 17:06:47 +0300 Subject: [PATCH 2/3] chore: added comment --- src/App.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/App.tsx b/src/App.tsx index 7d8744c..35e43d3 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -17,6 +17,7 @@ const App = () => { useEffect(() => { if (window.location.hostname === '0.0.0.0') { + // A change of the host is needed to make library available in windows object window.location.hostname = 'localhost' } From b27b27f067f916ec029d6471eea7ae9529ec1929 Mon Sep 17 00:00:00 2001 From: Yury Date: Wed, 29 May 2024 17:08:38 +0300 Subject: [PATCH 3/3] chore: added comment --- src/App.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/App.tsx b/src/App.tsx index 35e43d3..8956df1 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -18,6 +18,8 @@ const App = () => { useEffect(() => { if (window.location.hostname === '0.0.0.0') { // A change of the host is needed to make library available in windows object + // the app can't encrypt files without the crypto library + // which is only available on https or localhost window.location.hostname = 'localhost' }