Skip to content

Commit c9e1c37

Browse files
committed
Assume html if no Accept header is presented
Fixes #163.
1 parent 44863ed commit c9e1c37

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/dist.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ impl Handler for Middleware {
3939
// serve up that page. Otherwise proxy on to the rest of the app.
4040
let wants_html = req.headers().find("Accept").map(|accept| {
4141
accept.iter().any(|s| s.contains("html"))
42-
}).unwrap_or(false);
42+
}).unwrap_or(true); // If no Accept header is specified, serve up html.
4343
if wants_html {
4444
self.dist.call(&mut RequestProxy {
4545
other: req,

0 commit comments

Comments
 (0)