fix: return absolute asset urls (#3676)

This commit is contained in:
Livio Amstutz
2022-05-20 10:30:12 +02:00
committed by GitHub
parent db0e7495e7
commit 62c4a4d08d
16 changed files with 45 additions and 34 deletions

View File

@@ -1,10 +1,13 @@
package admin
import (
"context"
"google.golang.org/grpc"
"github.com/zitadel/zitadel/internal/admin/repository"
"github.com/zitadel/zitadel/internal/admin/repository/eventsourcing"
"github.com/zitadel/zitadel/internal/api/assets"
"github.com/zitadel/zitadel/internal/api/authz"
"github.com/zitadel/zitadel/internal/api/grpc/server"
"github.com/zitadel/zitadel/internal/command"
@@ -24,7 +27,7 @@ type Server struct {
command *command.Commands
query *query.Queries
administrator repository.AdministratorRepository
assetsAPIDomain string
assetsAPIDomain func(context.Context) string
userCodeAlg crypto.EncryptionAlgorithm
}
@@ -35,14 +38,14 @@ type Config struct {
func CreateServer(command *command.Commands,
query *query.Queries,
repo repository.Repository,
assetsAPIDomain string,
externalSecure bool,
userCodeAlg crypto.EncryptionAlgorithm,
) *Server {
return &Server{
command: command,
query: query,
administrator: repo,
assetsAPIDomain: assetsAPIDomain,
assetsAPIDomain: assets.AssetAPI(externalSecure),
userCodeAlg: userCodeAlg,
}
}