all repos — searchix @ 2edf3f098dd1bb79fd97a8f30fe28938cbde9f3c

Search engine for NixOS, nix-darwin, home-manager and NUR users

fix: render errors as HTML given correct content-type

Alan Pearce
commit

2edf3f098dd1bb79fd97a8f30fe28938cbde9f3c

parent

f9b034027565bbc59b36d1a318716088c3a77977

1 file changed, 2 insertions(+), 1 deletion(-)

jump to
M frontend/static/search.jsfrontend/static/search.js
@@ -80,7 +80,8 @@ fetch: "true",
}, }); - if (res.ok) { + // render errors sent as HTML as well as OK responses + if (res.headers.get("content-type").startsWith("text/html")) { state.fragment = await res.text(); state.opened = []; history.replaceState(state, null, url);