From cf45c744dd32a62461b63dcbfde4e37305e6afb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicole=20Miko=C5=82ajczyk?= Date: Wed, 30 Apr 2025 18:45:35 +0200 Subject: [PATCH] pl-fe: fix checkIfStandalone MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nicole Mikołajczyk --- packages/pl-fe/src/actions/instance.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/pl-fe/src/actions/instance.ts b/packages/pl-fe/src/actions/instance.ts index a4be5b9ca..3f2370050 100644 --- a/packages/pl-fe/src/actions/instance.ts +++ b/packages/pl-fe/src/actions/instance.ts @@ -46,8 +46,8 @@ interface StandaloneCheckSuccessAction { } const checkIfStandalone = () => (dispatch: AppDispatch) => - staticFetch('/api/v1/instance') - .then(({ ok }) => dispatch({ type: STANDALONE_CHECK_SUCCESS, ok })) + staticFetch('/api/v1/instance', { method: 'HEAD' }) + .then(({ ok, headers }) => dispatch({ type: STANDALONE_CHECK_SUCCESS, ok: ok && headers.get('content-type') === 'application/json' })) .catch((err) => dispatch({ type: STANDALONE_CHECK_SUCCESS, ok: err.response?.ok })); type InstanceAction =