π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Add config for locker url
Neeraj Gupta3aa419b43027
diff --git a/server/cmd/museum/main.go b/server/cmd/museum/main.goindex bda540113e..f0b8c2c371 100644--- a/server/cmd/museum/main.go+++ b/server/cmd/museum/main.go@@ -98,6 +98,7 @@ func main() {}viper.SetDefault("apps.public-albums", "https://albums.ente.io")+ viper.SetDefault("apps.public-locker", "https://locker.ente.io")viper.SetDefault("apps.accounts", "https://accounts.ente.io")viper.SetDefault("apps.cast", "https://cast.ente.io")viper.SetDefault("apps.family", "https://family.ente.io")@@ -179,6 +180,7 @@ func main() {familyRepo := &repo.FamilyRepository{DB: db}trashRepo := &repo.TrashRepository{DB: db, ObjectRepo: objectRepo, FileRepo: fileRepo, QueueRepo: queueRepo}collectionLinkRepo := public.NewCollectionLinkRepository(db, viper.GetString("apps.public-albums"))+ fileLinkRepo := public.NewFileLinkRepo(db)collectionRepo := &repo.CollectionRepository{DB: db, FileRepo: fileRepo, CollectionLinkRepo: collectionLinkRepo,TrashRepo: trashRepo, SecretEncryptionKey: secretEncryptionKeyBytes, QueueRepo: queueRepo, LatencyLogger: latencyLogger}pushRepo := &repo.PushTokenRepository{DB: db}@@ -430,7 +432,7 @@ func main() {}fileLinkCtrl := &publicCtrl.FileLinkController{FileController: fileController,- FileLinkRepo: nil,+ FileLinkRepo: fileLinkRepo,FileRepo: fileRepo,JwtSecret: jwtSecretBytes,}diff --git a/server/configurations/local.yaml b/server/configurations/local.yamlindex b6b1d567eb..a16f560e43 100644--- a/server/configurations/local.yaml+++ b/server/configurations/local.yaml@@ -79,9 +79,14 @@ http:apps:# Default is https://albums.ente.io#- # If you're running a self hosted instance and wish to serve public links,+ # If you're running a self hosted instance and wish to serve public links for photos,# set this to the URL where your albums web app is running.public-albums:+ # Default is https://locker.ente.io+ #+ # If you're running a self-hosted instance and wish to serve public links for locker,+ # set this to the URL where your albums web app is running.+ public-locker:# Default is https://cast.ente.iocast:# Default is https://accounts.ente.iodiff --git a/server/pkg/repo/public/file_link.go b/server/pkg/repo/public/file_link.goindex 3f6dbf7b33..c03b74c693 100644--- a/server/pkg/repo/public/file_link.go+++ b/server/pkg/repo/public/file_link.go@@ -6,6 +6,7 @@ import ("errors""fmt""github.com/ente-io/museum/ente/base"+ "github.com/spf13/viper""github.com/ente-io/museum/ente""github.com/ente-io/stacktrace"@@ -20,10 +21,12 @@ type FileLinkRepository struct {}// NewFileLinkRepo ..-func NewFileLinkRepo(db *sql.DB, albumHost string, lockerHost string) *FileLinkRepository {+func NewFileLinkRepo(db *sql.DB) *FileLinkRepository {+ albumHost := viper.GetString("apps.public-albums")if albumHost == "" {albumHost = "https://albums.ente.io"}+ lockerHost := viper.GetString("apps.public-locker")if lockerHost == "" {lockerHost = "https://locker.ente.io"}