Simplify UI passthrough logic (#148)

I realized we can handle the special case of `/index.html` by ensuring
that `/` does the right thing because that's _also_ standard behavior to
fetch `/index.html`. As a result this allows a lot of simplification.
This commit is contained in:
Jeff Mitchell authored and GitHub committed 2020-06-25 15:03:03 -04:00
1 parent 94f66c9ee6
commit 9d1d0ba08e
2 files changed
+13 -61

No files matched your search

@@ -90,6 +90,13 @@ func TestHandleDevPassthrough(t *testing.T) {
http.StatusOK,
"text/html; charset=utf-8",
},
{
"base slash",
"",
"index.html",
http.StatusOK,
"text/html; charset=utf-8",
},
{
"no extension",
"orgs",