Optional publish static files if use reverse-proxy
Dependencies
- [2]
XMUKNMKYPrepare for release - [3]
4MZ4VIR7Initial commit - [4]
BCXEUKX6Add config, static files and web server - [5]
IM5ZPD4NUpdate dependencies - [6]
65A3LIWUUse handlebars to render index - [7]
OJO4B4QOAdd login form and empty handler
Change contents
- edit in src/main.rs at line 1
#[cfg(feature = "actix-files")] - edit in src/main.rs at line 39
#[cfg(feature = "actix-files")] - edit in src/main.rs at line 41
#[cfg(not(feature = "actix-files"))]let Config { http } = config; - replacement in src/main.rs at line 53
App::new()let app = App::new() - replacement in src/main.rs at line 59[3.703]→[3.151:234](∅→∅),[3.912]→[3.151:234](∅→∅),[3.234]→[3.912:1279](∅→∅),[3.912]→[3.912:1279](∅→∅),[3.1279]→[3.1155:1209](∅→∅)
.service(web::resource("/login.do").route(web::post().to(login_post)))// Serve a tree of static files at the web root and specify the index file.// Note that the root path should always be defined as the last item. The paths are// resolved in the order they are defined. If this would be placed before the `/images`// path then the service for the static images would never be reached..service(Files::new("/static/", &public)).service(web::resource("/login.do").route(web::post().to(login_post)));// Serve a tree of static files at the web root and specify the index file.// Note that the root path should always be defined as the last item. The paths are// resolved in the order they are defined. If this would be placed before the `/images`// path then the service for the static images would never be reached.#[cfg(feature = "actix-files")]let app = app.service(Files::new("/static/", &public));app - edit in src/config.rs at line 10
#[cfg(feature = "actix-files")] - edit in Cargo.toml at line 6
resolver = "2"[features]non-proxied = ["actix-files"] - replacement in Cargo.toml at line 17
actix-files = "0.6.0-beta.2"actix-files = { version = "0.6.0-beta.2", optional = true } - replacement in Cargo.lock at line 746
version = "0.2.113"version = "0.2.114" - replacement in Cargo.lock at line 748
checksum = "eef78b64d87775463c549fbd80e19249ef436ea3bf1de2a1eb7e717ec7fab1e9"checksum = "b0005d08a8f7b65fb8073cb697aa0b12b631ed251ce73d862ce50eeb52ce3b50"