From fdb074b1713622ff986c22a19a2100a4f7d63a3f Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Wed, 17 Mar 2021 10:00:15 -0400 Subject: [PATCH] This seems to protect both sets of hidden endpoints --- frontends/README.md | 19 +++++++++++++++++++ .../src/components/UtteranceHistory.tsx | 2 +- tts_service/src/main.rs | 10 +++++++--- 3 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 frontends/README.md diff --git a/frontends/README.md b/frontends/README.md new file mode 100644 index 0000000000..13ed6eb20a --- /dev/null +++ b/frontends/README.md @@ -0,0 +1,19 @@ +Frontends +========= + +These are in various states of (dis)repair. The old admin endpoint is in really bad shape. + +Run this: + +``` +PUBLIC_URL=/twitch npm run build +``` + +or + + +``` +PUBLIC_URL=/early_access npm run build +``` + +to generate the appropriate base urls. diff --git a/frontends/twitch-early-access/src/components/UtteranceHistory.tsx b/frontends/twitch-early-access/src/components/UtteranceHistory.tsx index c65150db06..a4cf9c028f 100644 --- a/frontends/twitch-early-access/src/components/UtteranceHistory.tsx +++ b/frontends/twitch-early-access/src/components/UtteranceHistory.tsx @@ -29,7 +29,7 @@ class UtteranceHistory extends React.Component { {utterance.text}

- utterance.howl.play()}>Play + utterance.howl.play()}>Play

Download diff --git a/tts_service/src/main.rs b/tts_service/src/main.rs index b131ab9826..616a55c456 100644 --- a/tts_service/src/main.rs +++ b/tts_service/src/main.rs @@ -419,11 +419,15 @@ async fn run_server(app_state: AppState, server_args: ServerArgs) -> std::io::Re .exclude("/liveness") .exclude("/readiness")) .wrap(DefaultHeaders::new().header("X-Backend-Hostname", &server_hostname)) + // Admin UI & old frontend .service(Files::new("/frontend", admin_asset_directory.clone()) + .index_file("FAKE_INDEX.HTML")) + .service(Files::new("/adminui", admin_asset_directory.clone()) .index_file("index.html")) - .service(Files::new("/admin", admin_asset_directory.clone()) - .index_file("index.html")) - .service(Files::new("/patreon", patreon_asset_directory.clone()) + // Twitch and patreon + .service(Files::new("/early_access", patreon_asset_directory.clone()) + .index_file("FAKE_INDEX.HTML")) + .service(Files::new("/patreon-thanks", patreon_asset_directory.clone()) .index_file("index.html")) .service(Files::new("/twitch", twitch_asset_directory.clone()) .index_file("index.html"))