From f707f6d4ae60de21887983f97d70e4ffc5c62b11 Mon Sep 17 00:00:00 2001 From: Azalea Gui Date: Tue, 12 Sep 2023 09:37:06 -0400 Subject: [PATCH] [F] Fix content type after nginx update --- docs/nginx.conf | 2 +- src/App.tsx | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/nginx.conf b/docs/nginx.conf index acae827..cf48eb9 100644 --- a/docs/nginx.conf +++ b/docs/nginx.conf @@ -9,7 +9,7 @@ location /__meowindex__ { alias /etc/nginx/MeowIndex/dist; # Use sub_filter to configure the app - sub_filter_types application/javascript; + sub_filter_types application/javascript text/javascript; sub_filter_once off; sub_filter "{ASSETS-PATH-PLACEHOLDER}" "/__meowindex__"; sub_filter "{DEPLOY-PATH-PLACEHOLDER}" $deploy_path; diff --git a/src/App.tsx b/src/App.tsx index 1a04d36..3e475d8 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -33,7 +33,7 @@ let host = "{HOST-PLACEHOLDER}" // Default paths and host for testing if (assetsPath.includes("-PLACEHOLDER")) assetsPath = "/" if (deployPath.includes("-PLACEHOLDER")) deployPath = "/" -if (host.includes("-PLACEHOLDER")) host = "https://daisy.hydev.org/data/api" +if (host.includes("-PLACEHOLDER")) host = undefined // Compute path let fullPath = window.location.pathname @@ -116,6 +116,10 @@ export default function App() { setBcLeft(Math.max(bcMax = Math.round(w.clientWidth - w.parentElement.clientWidth), 0)) }, 100) + if (!host) return (
+ App is misconfigured. Please correct sub_filter. +
) + return ( // Full screen container