Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fix: protocol fixes in more places

Inian3070064cc54b
diff --git a/studio/components/interfaces/Settings/API/ServiceList.tsx b/studio/components/interfaces/Settings/API/ServiceList.tsx
index aba88820aac..ce2097d0b03 100644
--- a/studio/components/interfaces/Settings/API/ServiceList.tsx
+++ b/studio/components/interfaces/Settings/API/ServiceList.tsx
@@ -14,6 +14,8 @@ import Panel from 'components/ui/Panel'
import PostgrestConfig from './PostgrestConfig'
import { DisplayApiSettings } from 'components/ui/ProjectSettings'
import { JWT_SECRET_UPDATE_ERROR_MESSAGES } from './API.constants'
+import { PROJECT_ENDPOINT_PROTOCOL } from 'pages/api/constants'
+import { IS_PLATFORM } from 'lib/constants'
import JWTSettings from './JWTSettings'
interface Props {
@@ -77,7 +79,9 @@ const ServiceList: FC<Props> = ({ projectRef }) => {
readOnly
disabled
className="input-mono"
- value={`https://${apiConfig?.endpoint ?? '-'}`}
+ value={`${IS_PLATFORM ? 'https' : PROJECT_ENDPOINT_PROTOCOL}://${
+ apiConfig?.endpoint ?? '-'
+ }`}
descriptionText="A RESTful endpoint for querying and managing your database."
layout="horizontal"
/>
diff --git a/studio/components/ui/ProjectSettings/DisplayConfigSettings.tsx b/studio/components/ui/ProjectSettings/DisplayConfigSettings.tsx
index d43f8a3d478..ea70fb700dd 100644
--- a/studio/components/ui/ProjectSettings/DisplayConfigSettings.tsx
+++ b/studio/components/ui/ProjectSettings/DisplayConfigSettings.tsx
@@ -3,7 +3,8 @@ import { useRouter } from 'next/router'
import { Input, IconAlertCircle, IconLoader } from 'ui'
import { JwtSecretUpdateStatus } from '@supabase/shared-types/out/events'
import { useJwtSecretUpdateStatus, useProjectSettings } from 'hooks'
-import { DEFAULT_PROJECT_API_SERVICE_ID } from 'lib/constants'
+import { DEFAULT_PROJECT_API_SERVICE_ID, IS_PLATFORM } from 'lib/constants'
+import { PROJECT_ENDPOINT_PROTOCOL } from 'pages/api/constants'
import Panel from 'components/ui/Panel'
const DisplayConfigSettings = () => {
@@ -55,7 +56,7 @@ const DisplayConfigSettings = () => {
copy
disabled
className="input-mono"
- value={`https://${apiConfig.endpoint}`}
+ value={`${IS_PLATFORM ? 'https' : PROJECT_ENDPOINT_PROTOCOL}://${apiConfig.endpoint}`}
descriptionText="A RESTful endpoint for querying and managing your database."
layout="horizontal"
/>