mirror of
https://github.com/DefectingCat/candy
synced 2025-07-15 16:51:34 +00:00
fix(reverse_proxy): add wildcard for route
This commit is contained in:
@ -44,6 +44,9 @@ pub async fn make_server(host: SettingHost) -> anyhow::Result<()> {
|
|||||||
// reverse proxy
|
// reverse proxy
|
||||||
if host_route.proxy_pass.is_some() {
|
if host_route.proxy_pass.is_some() {
|
||||||
router = router.route(host_route.location.as_ref(), get(reverse_proxy::serve));
|
router = router.route(host_route.location.as_ref(), get(reverse_proxy::serve));
|
||||||
|
// register wildcard path /doc/*
|
||||||
|
let route_path = format!("{}{{*path}}", host_route.location);
|
||||||
|
router = router.route(route_path.as_ref(), get(reverse_proxy::serve));
|
||||||
// save route path to map
|
// save route path to map
|
||||||
{
|
{
|
||||||
host_to_save
|
host_to_save
|
||||||
|
Reference in New Issue
Block a user