Skip to content

Commit d8f68c5

Browse files
committed
make: return index.html on error
1 parent 94a7d22 commit d8f68c5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/langserver/spa.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func (fs *spaFileServer) ServeHTTP(w http.ResponseWriter, r *http.Request) {
4242
f, err := os.Open(name)
4343
if err != nil {
4444
if os.IsNotExist(err) {
45-
Errorf(http.StatusNotFound, "Not Found").Write(w)
45+
http.ServeFile(w, r, string(fs.root)+"/index.html")
4646
return
4747
}
4848
}

0 commit comments

Comments
 (0)