fix(storage): emit origin-relative object URLs
Build signed object URLs as path-only (/api/objects/...) instead of prefixing APP_BASE_URL, so media loads from whatever host or reverse proxy served the app. Remove the now-unused base URL from the signer and drop the APP_BASE_URL / Server.BaseURL config.
This commit is contained in:
@@ -39,8 +39,7 @@ type Auth struct {
|
||||
}
|
||||
|
||||
type Server struct {
|
||||
Addr string
|
||||
BaseURL string
|
||||
Addr string
|
||||
}
|
||||
|
||||
type SSE struct {
|
||||
@@ -227,8 +226,7 @@ func Load() (*Config, error) {
|
||||
RefreshTTL: refreshTTL,
|
||||
},
|
||||
Server: Server{
|
||||
Addr: getEnv("HTTP_ADDR", ":8080"),
|
||||
BaseURL: getEnv("APP_BASE_URL", "http://localhost:8080"),
|
||||
Addr: getEnv("HTTP_ADDR", ":8080"),
|
||||
},
|
||||
SSE: SSE{
|
||||
HeartbeatInterval: heartbeat,
|
||||
|
||||
Reference in New Issue
Block a user