mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-23 15:05:40 +00:00
clippy
This commit is contained in:
parent
f410a2bfa7
commit
9b173053c6
|
@ -1 +1 @@
|
||||||
Subproject commit 83540721c6035c701f4ef1daf7d95f78a51fedf7
|
Subproject commit 8bb90fa4a30e6dc2ba4449794e99d6b3325bebb5
|
|
@ -322,7 +322,7 @@ fn create_http_server(
|
||||||
fn cors_config(settings: &Settings) -> Cors {
|
fn cors_config(settings: &Settings) -> Cors {
|
||||||
let self_origin = settings.get_protocol_and_hostname();
|
let self_origin = settings.get_protocol_and_hostname();
|
||||||
let cors_origin_setting = settings.cors_origin();
|
let cors_origin_setting = settings.cors_origin();
|
||||||
let cors_config = match (cors_origin_setting.clone(), cfg!(debug_assertions)) {
|
match (cors_origin_setting.clone(), cfg!(debug_assertions)) {
|
||||||
(Some(origin), false) => {
|
(Some(origin), false) => {
|
||||||
// Need to call send_wildcard() explicitly, passing this into allowed_origin() results in error
|
// Need to call send_wildcard() explicitly, passing this into allowed_origin() results in error
|
||||||
if cors_origin_setting.as_deref() == Some("*") {
|
if cors_origin_setting.as_deref() == Some("*") {
|
||||||
|
@ -339,8 +339,7 @@ fn cors_config(settings: &Settings) -> Cors {
|
||||||
.allow_any_header()
|
.allow_any_header()
|
||||||
.expose_any_header()
|
.expose_any_header()
|
||||||
.max_age(3600),
|
.max_age(3600),
|
||||||
};
|
}
|
||||||
cors_config
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn init_logging(opentelemetry_url: &Option<Url>) -> Result<(), LemmyError> {
|
pub fn init_logging(opentelemetry_url: &Option<Url>) -> Result<(), LemmyError> {
|
||||||
|
|
Loading…
Reference in a new issue