Repository: LemmyNet/lemmy (language: rust)

Issue:
0.19 backport of #5235: Enable site languages for new user
- #5235 


Discussion / hints:
@Nutomic the CI failure for the diesel schema check is something I ran into as well when updating our CI for 0.19.8, as diesel recently released a new version that allows the `pq-sys` dependency on version 0.7, which requires rust 1.82.

when using `--locked` for the installation it'll install a version compatible with the rust version.

Fix patch:
diff --git a/crates/routes/src/utils/mod.rs b/crates/routes/src/utils/mod.rs
index 632905c902..6833e82fe5 100644
--- a/crates/routes/src/utils/mod.rs
+++ b/crates/routes/src/utils/mod.rs
@@ -15,7 +15,10 @@ pub fn cors_config(settings: &Settings) -> Cors {
     .expose_any_header()
     .max_age(3600);
 
-  if cfg!(debug_assertions) || cors_origin_setting.contains(&"*".to_string()) {
+  if cfg!(debug_assertions)
+    || cors_origin_setting.is_empty()
+    || cors_origin_setting.contains(&"*".to_string())
+  {
     cors = cors.allow_any_origin();
   } else {
     cors = cors.allowed_origin(&self_origin);


Test patch: