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,12 @@
package management
import (
"context"
"time"
"google.golang.org/grpc"
"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"
@@ -25,7 +27,7 @@ type Server struct {
command *command.Commands
query *query.Queries
systemDefaults systemdefaults.SystemDefaults
assetAPIPrefix string
assetAPIPrefix func(context.Context) string
passwordHashAlg crypto.HashAlgorithm
userCodeAlg crypto.EncryptionAlgorithm
externalSecure bool
@@ -37,7 +39,6 @@ func CreateServer(
command *command.Commands,
query *query.Queries,
sd systemdefaults.SystemDefaults,
assetAPIPrefix string,
userCodeAlg crypto.EncryptionAlgorithm,
externalSecure bool,
issuerPath string,
@@ -47,7 +48,7 @@ func CreateServer(
command: command,
query: query,
systemDefaults: sd,
assetAPIPrefix: assetAPIPrefix,
assetAPIPrefix: assets.AssetAPI(externalSecure),
passwordHashAlg: crypto.NewBCrypt(sd.SecretGenerators.PasswordSaltCost),
userCodeAlg: userCodeAlg,
externalSecure: externalSecure,