more fucking UI fixes
Some checks are pending
CI Pipeline / Run Tests (push) Waiting to run
CI Pipeline / Lint Code (push) Waiting to run
CI Pipeline / Security Scan (push) Waiting to run
CI Pipeline / E2E Tests (push) Blocked by required conditions

This commit is contained in:
Enki 2025-08-27 23:05:07 -07:00
parent d259bc3a8e
commit c82d5554d8

View File

@ -4196,8 +4196,11 @@ func (g *Gateway) calculateWebTorrentPieceLength(fileSize int64) int64 {
// getBaseURL returns the base URL for the gateway // getBaseURL returns the base URL for the gateway
func (g *Gateway) getBaseURL() string { func (g *Gateway) getBaseURL() string {
// TODO: This should be configurable or detected from request // Use configured public URL if available, otherwise fall back to localhost
// For now, use localhost with the configured port if g.publicURL != "" && g.publicURL != "http://localhost" {
return g.publicURL
}
// Fallback to localhost (for development)
return fmt.Sprintf("http://localhost:%d", g.config.Gateway.Port) return fmt.Sprintf("http://localhost:%d", g.config.Gateway.Port)
} }