mirror of
https://github.com/Drop-OSS/drop.git
synced 2026-07-24 17:03:00 +10:00
Clippy CI/CD (#67)
* feat: add clippy ci * fix: clippy errors * fix: ci/cd * fix: update ci packages * fix: add gtk3 to ci deps * fix: add webkit to ci deps * fix: ci deps and perms * fix: add clippy settings to lib.rs
This commit is contained in:
@@ -26,17 +26,16 @@ pub fn handle_server_proto(request: Request<Vec<u8>>, responder: UriSchemeRespon
|
||||
|
||||
let mut new_uri = request.uri().clone().into_parts();
|
||||
new_uri.path_and_query =
|
||||
Some(PathAndQuery::from_str(&format!("{}?noWrapper=true", path)).unwrap());
|
||||
Some(PathAndQuery::from_str(&format!("{path}?noWrapper=true")).unwrap());
|
||||
new_uri.authority = remote_uri.authority().cloned();
|
||||
new_uri.scheme = remote_uri.scheme().cloned();
|
||||
let new_uri = Uri::from_parts(new_uri).unwrap();
|
||||
|
||||
let whitelist_prefix = vec!["/store", "/api", "/_", "/fonts"];
|
||||
let whitelist_prefix = ["/store", "/api", "/_", "/fonts"];
|
||||
|
||||
if whitelist_prefix
|
||||
.iter()
|
||||
.map(|f| !path.starts_with(f))
|
||||
.all(|f| f)
|
||||
.all(|f| !path.starts_with(f))
|
||||
{
|
||||
webbrowser::open(&new_uri.to_string()).unwrap();
|
||||
return;
|
||||
@@ -45,7 +44,7 @@ pub fn handle_server_proto(request: Request<Vec<u8>>, responder: UriSchemeRespon
|
||||
let client = Client::new();
|
||||
let response = client
|
||||
.request(request.method().clone(), new_uri.to_string())
|
||||
.header("Authorization", format!("Bearer {}", web_token))
|
||||
.header("Authorization", format!("Bearer {web_token}"))
|
||||
.headers(request.headers().clone())
|
||||
.send()
|
||||
.unwrap();
|
||||
|
||||
Reference in New Issue
Block a user