Use stable files API URLs for vendor logo fields

CommonThirdParty.logoUrl and TrustCenterReference.logoUrl were
returning expiring S3 presigned URLs, which break if cached or
shared past their TTL.

Replace with stable /api/files/v1/{id} application URLs.
file.Service now generates these via baseurl; a new filesign
package owns presigning for the files/v1 HTTP handler that
does the internal redirect.

Signed-off-by: Ludovic Vielle <ludovic@probo.com>
This commit is contained in:
Ludovic Vielle
2026-06-03 10:21:02 +02:00
parent 383ea5a2d4
commit 6c072a2f7b
14 changed files with 115 additions and 116 deletions

View File

@@ -31,7 +31,7 @@ import (
"go.probo.inc/probo/pkg/connector/provider"
"go.probo.inc/probo/pkg/cookiebanner"
"go.probo.inc/probo/pkg/esign"
"go.probo.inc/probo/pkg/file"
"go.probo.inc/probo/pkg/filesign"
"go.probo.inc/probo/pkg/geoloc"
"go.probo.inc/probo/pkg/iam"
"go.probo.inc/probo/pkg/mailman"
@@ -55,7 +55,7 @@ type (
BaseURL *baseurl.BaseURL
AllowedOrigins []string
Probo *probo.Service
File *file.Service
FileSign *filesign.Service
IAM *iam.Service
Trust *trust.Service
ESign *esign.Service
@@ -207,7 +207,7 @@ func NewServer(cfg Config) (*Server, error) {
),
filesHandler: files_v1.NewMux(
cfg.Logger.Named("files.v1"),
cfg.File,
cfg.FileSign,
),
mcpHandler: mcp_v1.NewMux(
cfg.Logger.Named("mcp.v1"),