π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Preserve app defaults in CORS origins
Manav Rathi2d8e448ad753
diff --git a/server/cmd/museum/main.go b/server/cmd/museum/main.goindex 3c796985f2..feb7d3e828 100644--- a/server/cmd/museum/main.go+++ b/server/cmd/museum/main.go@@ -1408,7 +1408,8 @@ func setupAndStartCrons(userAuthRepo *repo.UserAuthRepository, collectionLinkRepfunc cors() gin.HandlerFunc {origins := []string{"ente://app"}- for _, value := range viper.GetStringMap("apps") {+ apps, _ := viper.AllSettings()["apps"].(map[string]interface{})+ for _, value := range apps {if origin, ok := value.(string); ok {origins = append(origins, origin)}diff --git a/server/cmd/museum/main_cors_test.go b/server/cmd/museum/main_cors_test.goindex 7b0f1bdcd6..9a53736bbe 100644--- a/server/cmd/museum/main_cors_test.go+++ b/server/cmd/museum/main_cors_test.go@@ -79,6 +79,7 @@ func TestCORS(t *testing.T) {func TestCORSProductionOriginsAreDefaults(t *testing.T) {viper.Reset()+ viper.Set("apps", map[string]interface{}{"accounts": "https://accounts.ente.com"})setAppDefaults()t.Cleanup(viper.Reset)