Cors: more finegrained allowlist, make it simpler
This commit is contained in:
parent
98ce0408f7
commit
55f3b23eed
7 changed files with 19 additions and 40 deletions
|
|
@ -88,7 +88,6 @@ pub struct RqbitDesktopConfigHttpApi {
|
|||
pub disable: bool,
|
||||
pub listen_addr: SocketAddr,
|
||||
pub read_only: bool,
|
||||
pub cors_enable_all: bool,
|
||||
}
|
||||
|
||||
impl Default for RqbitDesktopConfigHttpApi {
|
||||
|
|
@ -97,7 +96,6 @@ impl Default for RqbitDesktopConfigHttpApi {
|
|||
disable: Default::default(),
|
||||
listen_addr: SocketAddr::V4(SocketAddrV4::new(Ipv4Addr::new(127, 0, 0, 1), 3030)),
|
||||
read_only: false,
|
||||
cors_enable_all: true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -103,7 +103,6 @@ async fn api_from_config(
|
|||
let http_api_task = librqbit::http_api::HttpApi::new(
|
||||
api.clone(),
|
||||
Some(librqbit::http_api::HttpApiOptions {
|
||||
cors_enable_all: config.http_api.cors_enable_all,
|
||||
read_only: config.http_api.read_only,
|
||||
}),
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue