mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-01-31 00:35:19 +01:00
fix(core): mobile dev server proxy URL (#10943)
This commit is contained in:
committed by
GitHub
parent
0a47bf0430
commit
fafceec309
5
.changes/fix-dev-server-proxy-url.md
Normal file
5
.changes/fix-dev-server-proxy-url.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri": patch:bug
|
||||
---
|
||||
|
||||
Fixes mobile dev server proxy request URL with trailing slashes.
|
||||
@@ -102,7 +102,11 @@ fn get_response<R: Runtime>(
|
||||
let decoded_path = percent_encoding::percent_decode(path.as_bytes())
|
||||
.decode_utf8_lossy()
|
||||
.to_string();
|
||||
let url = format!("{url}{decoded_path}");
|
||||
let url = format!(
|
||||
"{}/{}",
|
||||
url.trim_end_matches('/'),
|
||||
decoded_path.trim_start_matches('/')
|
||||
);
|
||||
|
||||
let mut proxy_builder = reqwest::ClientBuilder::new()
|
||||
.build()
|
||||
|
||||
Reference in New Issue
Block a user