Skip to content

Commit

Permalink
fix(webserver): check _rsc query with contains (#2475)
Browse files Browse the repository at this point in the history
* fix(webserver): fix /files prefetching with _rsc

* fix(webserver): check _rsc query with contains
  • Loading branch information
wsxiaoys authored Jun 21, 2024
1 parent b58d077 commit 8f988b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ee/tabby-webserver/src/routes/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ pub async fn handler(uri: Uri) -> impl IntoResponse {
if path.is_empty() {
"index.html".clone_into(&mut path)
} else if path.starts_with("files/") {
if path.ends_with(".txt") && query.is_some_and(|x| x.starts_with("_rsc=")) {
if query.is_some_and(|x| x.contains("_rsc=")) {
"files.txt".clone_into(&mut path)
} else {
"files.html".clone_into(&mut path)
Expand Down

0 comments on commit 8f988b9

Please sign in to comment.