Skip to content

Commit

Permalink
Merge pull request #56 from thedodd/bug-fix-in-server
Browse files Browse the repository at this point in the history
Fix a regression in the server.
  • Loading branch information
thedodd authored Sep 23, 2020
2 parents 1e5fd86 + 7939a7b commit 5c40aae
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ This changelog follows the patterns described here: https://keepachangelog.com/e

## Unreleased

## 0.5.1
### fixed
- Closes [#55](https://github.com/thedodd/trunk/issues/55): Fixed a regression in the server where the middleware was declared after the handler, and was thus not working as needed. Putting the middleware first fixes the issue.

## 0.5.0
### added
- Added support for proxying requests to arbitrary HTTP backends.
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "trunk"
version = "0.5.0"
version = "0.5.1"
edition = "2018"
description = "Build, bundle & ship your Rust WASM application to the web."
license = "MIT/Apache-2.0"
Expand Down
4 changes: 2 additions & 2 deletions src/serve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ impl ServeSystem {
// Build app.
tide::log::with_level(tide::log::LevelFilter::Error);
let mut app = tide::with_state(State { index });
app.at(&cfg.watch.build.public_url)
.with(IndexHtmlMiddleware)
app.with(IndexHtmlMiddleware)
.at(&cfg.watch.build.public_url)
.serve_dir(cfg.watch.build.dist.to_string_lossy().as_ref())?;

// Build proxies.
Expand Down

0 comments on commit 5c40aae

Please sign in to comment.