@@ -600,7 +600,7 @@ func (c *config) Load(path string, fsys fs.FS, overrides ...ConfigEditor) error
600600 if connString , err := fs .ReadFile (fsys , builder .PoolerUrlPath ); err == nil && len (connString ) > 0 {
601601 c .Db .Pooler .ConnectionString = string (connString )
602602 }
603- if len (c .Api . ExternalUrl ) == 0 {
603+ if len (c .Studio . ApiUrl ) == 0 {
604604 // Update external api url
605605 apiUrl := url.URL {Host : net .JoinHostPort (c .Hostname ,
606606 strconv .FormatUint (uint64 (c .Api .Port ), 10 ),
@@ -610,11 +610,11 @@ func (c *config) Load(path string, fsys fs.FS, overrides ...ConfigEditor) error
610610 } else {
611611 apiUrl .Scheme = "http"
612612 }
613- c .Api . ExternalUrl = apiUrl .String ()
613+ c .Studio . ApiUrl = apiUrl .String ()
614614 }
615615 // Set default JWT issuer if not configured
616616 if len (c .Auth .JwtIssuer ) == 0 {
617- c .Auth .JwtIssuer = c .Api . ExternalUrl + "/auth/v1"
617+ c .Auth .JwtIssuer = c .Studio . ApiUrl + "/auth/v1"
618618 }
619619 // Update image versions
620620 switch c .Db .MajorVersion {
@@ -860,7 +860,7 @@ func (c *config) Validate(fsys fs.FS) error {
860860 if parsed , err := url .Parse (c .Studio .ApiUrl ); err != nil {
861861 return errors .Errorf ("Invalid config for studio.api_url: %w" , err )
862862 } else if parsed .Host == "" || parsed .Host == c .Hostname {
863- c . Studio . ApiUrl = c . Api . ExternalUrl
863+ return errors . New ( "studio.api_url must be set to a different host than the project hostname" )
864864 }
865865 }
866866 // Validate smtp config
0 commit comments