This seems to protect both sets of hidden endpoints

This commit is contained in:
Brandon Thomas committed 2021-03-17 10:00:15 -04:00
1 parent faa75eae82
commit fdb074b171
3 files changed
+27 -4

No files matched your search

+19
View File
@@ -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.
@@ -29,7 +29,7 @@ class UtteranceHistory extends React.Component<Props, State> {
{utterance.text}
</p>
<p>
<a href="#" onClick={() => utterance.howl.play()}>Play</a>
<a onClick={() => utterance.howl.play()}>Play</a>
</p>
<p>
<a href={utterance.url} target="_blank" download="vocodes-early-access.wav">Download</a>
+7 -3
View File
@@ -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"))