Add proxy routes in startup_default(…)
This commit is contained in:
1 parent
917acf47fc
commit
2c787f85f4
1 file changed
+3
-1
+3
-1
@@ -447,7 +447,9 @@ pub async fn startup_default(ip: String, port: u16, config: CrateConfig) -> Resu
|
|||||||
.service(ServeDir::new(config.crate_dir.join(&dist_path)));
|
.service(ServeDir::new(config.crate_dir.join(&dist_path)));
|
||||||
|
|
||||||
let mut router = Router::new().route("/_dioxus/ws", get(ws_handler));
|
let mut router = Router::new().route("/_dioxus/ws", get(ws_handler));
|
||||||
|
for proxy_config in config.dioxus_config.web.proxy.unwrap_or_default() {
|
||||||
|
router = proxy::add_proxy(router, &proxy_config)?;
|
||||||
|
}
|
||||||
router = router
|
router = router
|
||||||
.fallback(
|
.fallback(
|
||||||
get_service(file_service).handle_error(|error: std::io::Error| async move {
|
get_service(file_service).handle_error(|error: std::io::Error| async move {
|
||||||
|
|||||||
Reference in new issue
Block a user