diff --git a/src/H5webApp.tsx b/src/H5webApp.tsx index be2d686..97b352e 100644 --- a/src/H5webApp.tsx +++ b/src/H5webApp.tsx @@ -25,11 +25,14 @@ function TwoRenderApp() { function H5webApp(props: { filePath: string }) { const { filePath } = props; - const { baseUrl } = ServerConnection.makeSettings(); + const { baseUrl, token } = ServerConnection.makeSettings(); const axiosConfig = useMemo( - () => ({ params: { file: filePath } }), - [filePath] + () => ({ + params: { file: filePath }, + headers: token ? { Authorization: `token ${token}` } : {}, + }), + [filePath, token] ); return (