The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
docs: update edge function url format
Greg Richardsonc74380090979
diff --git a/apps/docs/layouts/guides/index.tsx b/apps/docs/layouts/guides/index.tsxindex 130e76e2510..16111871418 100644--- a/apps/docs/layouts/guides/index.tsx+++ b/apps/docs/layouts/guides/index.tsx@@ -69,7 +69,7 @@ const Layout: FC<Props> = (props) => {const ogPageType = asPath.split('/')[2]// open graph image url constructorconst ogImageUrl = encodeURI(- `https://obuldanrptloktxcffvn.functions.supabase.co/og-images?site=docs${+ `https://obuldanrptloktxcffvn.supabase.co/functions/v1/og-images?site=docs${ogPageType ? `&type=${ogPageType}` : ''}&title=${props.meta?.title}&description=${props.meta?.description}`)diff --git a/apps/docs/pages/guides/ai/examples/headless-vector-search.mdx b/apps/docs/pages/guides/ai/examples/headless-vector-search.mdxindex 41dbde87ee4..9267986b634 100644--- a/apps/docs/pages/guides/ai/examples/headless-vector-search.mdx+++ b/apps/docs/pages/guides/ai/examples/headless-vector-search.mdx@@ -87,7 +87,7 @@ const onSubmit = (e: Event) => {isLoading.value = trueconst query = new URLSearchParams({ query: inputRef.current!.value })- const projectUrl = `https://your-project-ref.functions.supabase.co`+ const projectUrl = `https://your-project-ref.supabase.co/functions/v1`const queryURL = `${projectURL}/${query}`const eventSource = new EventSource(queryURL)diff --git a/apps/docs/pages/guides/database/extensions/pg_cron.mdx b/apps/docs/pages/guides/database/extensions/pg_cron.mdxindex fb4214c8f1c..f4f1739ade3 100644--- a/apps/docs/pages/guides/database/extensions/pg_cron.mdx+++ b/apps/docs/pages/guides/database/extensions/pg_cron.mdx@@ -99,7 +99,7 @@ select$$selectnet.http_post(- url:='https://project-ref.functions.supabase.co/function-name',+ url:='https://project-ref.supabase.co/functions/v1/function-name',headers:='{"Content-Type": "application/json", "Authorization": "Bearer YOUR_ANON_KEY"}'::jsonb,body:=concat('{"time": "', now(), '"}')::jsonb) as request_id;diff --git a/apps/docs/pages/guides/database/extensions/pg_net.mdx b/apps/docs/pages/guides/database/extensions/pg_net.mdxindex d7c9d8c7c62..9dcfdc64f17 100644--- a/apps/docs/pages/guides/database/extensions/pg_net.mdx+++ b/apps/docs/pages/guides/database/extensions/pg_net.mdx@@ -157,7 +157,7 @@ Make a POST request to a Supabase Edge Function with auth header and JSON body p```sqlselectnet.http_post(- url:='https://project-ref.functions.supabase.co/function-name',+ url:='https://project-ref.supabase.co/functions/v1/function-name',headers:='{"Content-Type": "application/json", "Authorization": "Bearer YOUR_ANON_KEY"}'::jsonb,body:='{"name": "pg_net"}'::jsonb) as request_id;diff --git a/apps/docs/pages/guides/functions/quickstart.mdx b/apps/docs/pages/guides/functions/quickstart.mdxindex 26fcc5623c7..a28f5bf4adf 100644--- a/apps/docs/pages/guides/functions/quickstart.mdx+++ b/apps/docs/pages/guides/functions/quickstart.mdx@@ -78,7 +78,7 @@ verify_jwt = falseYou can invoke Edge Functions using curl:```bash-curl --request POST 'https://<project_ref>.functions.supabase.co/hello-world' \+curl --request POST 'https://<project_ref>.supabase.co/functions/v1/hello-world' \--header 'Authorization: Bearer ANON_KEY' \--header 'Content-Type: application/json' \--data '{ "name":"Functions" }'diff --git a/apps/docs/pages/guides/functions/schedule-functions.mdx b/apps/docs/pages/guides/functions/schedule-functions.mdxindex fb4b0552824..2e53323e974 100644--- a/apps/docs/pages/guides/functions/schedule-functions.mdx+++ b/apps/docs/pages/guides/functions/schedule-functions.mdx@@ -33,7 +33,7 @@ select$$selectnet.http_post(- url:='https://project-ref.functions.supabase.co/function-name',+ url:='https://project-ref.supabase.co/functions/v1/function-name',headers:='{"Content-Type": "application/json", "Authorization": "Bearer YOUR_ANON_KEY"}'::jsonb,body:=concat('{"time": "', now(), '"}')::jsonb) as request_id;diff --git a/apps/www/components/LaunchWeek/7/Ticket/TicketActions.tsx b/apps/www/components/LaunchWeek/7/Ticket/TicketActions.tsxindex ad775d8a483..87fcd15a9ad 100644--- a/apps/www/components/LaunchWeek/7/Ticket/TicketActions.tsx+++ b/apps/www/components/LaunchWeek/7/Ticket/TicketActions.tsx@@ -31,7 +31,7 @@ export default function TicketActions({'twitter')}&via=supabase&text=${text}`const linkedInUrl = `https://www.linkedin.com/sharing/share-offsite/?url=${permalink('linkedin')}`- const downloadUrl = `https://obuldanrptloktxcffvn.functions.supabase.co/lw7-ticket-og?username=${encodeURIComponent(+ const downloadUrl = `https://obuldanrptloktxcffvn.supabase.co/functions/v1/lw7-ticket-og?username=${encodeURIComponent(username)}`const params = useParams()diff --git a/apps/www/components/LaunchWeek/7/Ticket/TicketForm.tsx b/apps/www/components/LaunchWeek/7/Ticket/TicketForm.tsxindex babc14d61cf..a0e7deeb830 100644--- a/apps/www/components/LaunchWeek/7/Ticket/TicketForm.tsx+++ b/apps/www/components/LaunchWeek/7/Ticket/TicketForm.tsx@@ -60,7 +60,7 @@ export default function TicketForm({ defaultUsername = '', setTicketGenerationStfetch(`/launch-week/tickets/${username}`).catch((_) => {})// Prefetch ticket og image.fetch(- `https://obuldanrptloktxcffvn.functions.supabase.co/lw7-ticket-og?username=${encodeURIComponent(+ `https://obuldanrptloktxcffvn.supabase.co/functions/v1/lw7-ticket-og?username=${encodeURIComponent(username ?? '')}`).catch((_) => {})diff --git a/apps/www/components/LaunchWeek/8/Ticket/TicketActions.tsx b/apps/www/components/LaunchWeek/8/Ticket/TicketActions.tsxindex 103e8b5e63b..914e8ee864e 100644--- a/apps/www/components/LaunchWeek/8/Ticket/TicketActions.tsx+++ b/apps/www/components/LaunchWeek/8/Ticket/TicketActions.tsx@@ -30,7 +30,7 @@ export default function TicketActions({const { userData, supabase } = useConfData()const tweetUrl = `https://twitter.com/intent/tweet?url=${permalink}&via=supabase&text=${encodedText}`const linkedInUrl = `https://www.linkedin.com/sharing/share-offsite/?url=${permalink}`- const downloadUrl = `https://obuldanrptloktxcffvn.functions.supabase.co/lw8-ticket?username=${encodeURIComponent(+ const downloadUrl = `https://obuldanrptloktxcffvn.supabase.co/functions/v1/lw8-ticket?username=${encodeURIComponent(username)}`const params = useParams()diff --git a/apps/www/pages/launch-week/7/tickets/[username].tsx b/apps/www/pages/launch-week/7/tickets/[username].tsxindex be288f21893..14eedd28283 100644--- a/apps/www/pages/launch-week/7/tickets/[username].tsx+++ b/apps/www/pages/launch-week/7/tickets/[username].tsx@@ -132,7 +132,7 @@ export const getStaticProps: GetStaticProps = async ({ params }) => {golden = user?.golden ?? falsebg_image_id = user?.bg_image_id ?? 1referrals = user?.referrals ?? 0- ogImageUrl = `https://obuldanrptloktxcffvn.functions.supabase.co/lw7-ticket-og?username=${encodeURIComponent(+ ogImageUrl = `https://obuldanrptloktxcffvn.supabase.co/functions/v1/lw7-ticket-og?username=${encodeURIComponent(username ?? '')}${golden ? '&golden=true' : ''}`}diff --git a/apps/www/pages/launch-week/7/tickets/index.tsx b/apps/www/pages/launch-week/7/tickets/index.tsxindex 37cfc0c287b..de398f62c21 100644--- a/apps/www/pages/launch-week/7/tickets/index.tsx+++ b/apps/www/pages/launch-week/7/tickets/index.tsx@@ -27,7 +27,7 @@ const supabaseAdmin = createClient(const generateOgs = async (users: UserData[]) => {users?.map(async (user) => {- const ogImageUrl = `https://obuldanrptloktxcffvn.functions.supabase.co/lw7-ticket-og?username=${encodeURIComponent(+ const ogImageUrl = `https://obuldanrptloktxcffvn.supabase.co/functions/v1/lw7-ticket-og?username=${encodeURIComponent(user.username ?? '')}${!!user.golden ? '&golden=true' : ''}`return await fetch(ogImageUrl)diff --git a/apps/www/pages/launch-week/tickets/[username].tsx b/apps/www/pages/launch-week/tickets/[username].tsxindex 28b957b7659..d8246c9258e 100644--- a/apps/www/pages/launch-week/tickets/[username].tsx+++ b/apps/www/pages/launch-week/tickets/[username].tsx@@ -144,7 +144,7 @@ export const getStaticProps: GetStaticProps = async ({ params }) => {const { data: users } = await supabaseAdmin!.from('lw8_tickets_golden').select().limit(17)fetch(- `https://obuldanrptloktxcffvn.functions.supabase.co/lw8-ticket?username=${encodeURIComponent(+ `https://obuldanrptloktxcffvn.supabase.co/functions/v1/lw8-ticket?username=${encodeURIComponent(username ?? '')}`).catch((_) => {})diff --git a/apps/www/pages/launch-week/tickets/index.tsx b/apps/www/pages/launch-week/tickets/index.tsxindex 1dbec06cf36..17875124813 100644--- a/apps/www/pages/launch-week/tickets/index.tsx+++ b/apps/www/pages/launch-week/tickets/index.tsx@@ -28,7 +28,7 @@ const supabaseAdmin = createClient(const generateOgs = async (users: UserData[]) => {users?.map(async (user) => {- const ogImageUrl = `https://obuldanrptloktxcffvn.functions.supabase.co/lw8-ticket-og?username=${encodeURIComponent(+ const ogImageUrl = `https://obuldanrptloktxcffvn.supabase.co/functions/v1/lw8-ticket-og?username=${encodeURIComponent(user.username ?? '')}${!!user.golden ? '&golden=true' : ''}`return await fetch(ogImageUrl)diff --git a/apps/www/supabase/functions/launchweek-ticket-og/README.md b/apps/www/supabase/functions/launchweek-ticket-og/README.mdindex 260f2a6457d..50104fcea85 100644--- a/apps/www/supabase/functions/launchweek-ticket-og/README.md+++ b/apps/www/supabase/functions/launchweek-ticket-og/README.md@@ -4,7 +4,7 @@ Generate Open Graph images with Deno and Supabase Edge Functions and cache the g- Docs: https://deno.land/x/[email protected]- Examples: https://vercel.com/docs/concepts/functions/edge-functions/og-image-examples-- Demo: https://obuldanrptloktxcffvn.functions.supabase.co/launchweek-ticket-og?username=thorwebdev+- Demo: https://obuldanrptloktxcffvn.supabase.co/functions/v1/launchweek-ticket-og?username=thorwebdev## Run locallydiff --git a/apps/www/supabase/functions/lw7-ticket-og/README.md b/apps/www/supabase/functions/lw7-ticket-og/README.mdindex 3eaafadbae2..08ac5c8bfc9 100644--- a/apps/www/supabase/functions/lw7-ticket-og/README.md+++ b/apps/www/supabase/functions/lw7-ticket-og/README.md@@ -4,7 +4,7 @@ Generate Open Graph images with Deno and Supabase Edge Functions and cache the g- Docs: https://deno.land/x/[email protected]- Examples: https://vercel.com/docs/concepts/functions/edge-functions/og-image-examples-- Demo: https://obuldanrptloktxcffvn.functions.supabase.co/lw7-ticket-og?username=thorwebdev+- Demo: https://obuldanrptloktxcffvn.supabase.co/functions/v1/lw7-ticket-og?username=thorwebdev## Run locallydiff --git a/apps/www/supabase/functions/lw7-ticket-og/handler.tsx b/apps/www/supabase/functions/lw7-ticket-og/handler.tsxindex 036ef6e10f4..b1a7c95d3e5 100644--- a/apps/www/supabase/functions/lw7-ticket-og/handler.tsx+++ b/apps/www/supabase/functions/lw7-ticket-og/handler.tsx@@ -256,7 +256,7 @@ export async function handler(req: Request) {)if (storageError) throw new Error(`storageError: ${storageError.message}`)// Generate image for gallery- fetch('https://obuldanrptloktxcffvn.functions.supabase.co/lw7-ticket-gallery', {+ fetch('https://obuldanrptloktxcffvn.supabase.co/functions/v1/lw7-ticket-gallery', {method: 'POST',headers: {'Content-Type': 'application/json',diff --git a/apps/www/supabase/functions/lw8-ticket/README.md b/apps/www/supabase/functions/lw8-ticket/README.mdindex 9c5b3d4e49e..b7f60e0f9ec 100644--- a/apps/www/supabase/functions/lw8-ticket/README.md+++ b/apps/www/supabase/functions/lw8-ticket/README.md@@ -4,7 +4,7 @@ Generate Open Graph images with Deno and Supabase Edge Functions and cache the g- Docs: https://deno.land/x/[email protected]- Examples: https://vercel.com/docs/concepts/functions/edge-functions/og-image-examples-- Demo: https://obuldanrptloktxcffvn.functions.supabase.co/lw8-ticket?username=thorwebdev+- Demo: https://obuldanrptloktxcffvn.supabase.co/functions/v1/lw8-ticket?username=thorwebdev## Run locallydiff --git a/apps/www/supabase/functions/lw8-ticket/handler.tsx b/apps/www/supabase/functions/lw8-ticket/handler.tsxindex 937982b919d..57c8d597fe4 100644--- a/apps/www/supabase/functions/lw8-ticket/handler.tsx+++ b/apps/www/supabase/functions/lw8-ticket/handler.tsx@@ -252,7 +252,7 @@ export async function handler(req: Request) {if (storageError) throw new Error(`storageError: ${storageError.message}`)// Generate og image- fetch('https://obuldanrptloktxcffvn.functions.supabase.co/lw8-ticket-og', {+ fetch('https://obuldanrptloktxcffvn.supabase.co/functions/v1/lw8-ticket-og', {method: 'POST',headers: {'Content-Type': 'application/json',diff --git a/examples/edge-functions/supabase/functions/get-tshirt-competition/README.md b/examples/edge-functions/supabase/functions/get-tshirt-competition/README.mdindex b83a049526c..7ce099cbb2b 100644--- a/examples/edge-functions/supabase/functions/get-tshirt-competition/README.md+++ b/examples/edge-functions/supabase/functions/get-tshirt-competition/README.md@@ -2,10 +2,10 @@To celebrate the support of GET requests in Supabase Edge Functions we're giving away some limited edition Functions Shirts!-To win a Supabase Edge Functions T-Shirt, make a GET request to https://obuldanrptloktxcffvn.functions.supabase.co/get-tshirt-competition with your email address, your Twitter handle (optional), your t-shirt size (S-2XL) and the correct answer, e.g.+To win a Supabase Edge Functions T-Shirt, make a GET request to https://obuldanrptloktxcffvn.supabase.co/functions/v1/get-tshirt-competition with your email address, your Twitter handle (optional), your t-shirt size (S-2XL) and the correct answer, e.g.```text-https://obuldanrptloktxcffvn.functions.supabase.co/[email protected]&twitter=thorwebdev&size=2XL&answer=20+https://obuldanrptloktxcffvn.supabase.co/functions/v1/[email protected]&twitter=thorwebdev&size=2XL&answer=20```You can read the functions source code to figure out the answer ;)diff --git a/examples/edge-functions/supabase/functions/og-image-with-storage-cdn/README.md b/examples/edge-functions/supabase/functions/og-image-with-storage-cdn/README.mdindex 05158fd957e..c017da00660 100644--- a/examples/edge-functions/supabase/functions/og-image-with-storage-cdn/README.md+++ b/examples/edge-functions/supabase/functions/og-image-with-storage-cdn/README.md@@ -4,7 +4,7 @@ Generate Open Graph images with Deno and Supabase Edge Functions and cache the g- Docs: https://deno.land/x/[email protected]- Examples: https://vercel.com/docs/concepts/functions/edge-functions/og-image-examples-- Demo: https://obuldanrptloktxcffvn.functions.supabase.co/launchweek-ticket-og?ticketNumber=1234&username=thorwebdev&name=Thor%20%E9%9B%B7%E7%A5%9E%20Schaeff+- Demo: https://obuldanrptloktxcffvn.supabase.co/functions/v1/launchweek-ticket-og?ticketNumber=1234&username=thorwebdev&name=Thor%20%E9%9B%B7%E7%A5%9E%20Schaeff## Run locallydiff --git a/examples/edge-functions/supabase/functions/telegram-bot/README.md b/examples/edge-functions/supabase/functions/telegram-bot/README.mdindex 6abc07c5ba3..3b42765655a 100644--- a/examples/edge-functions/supabase/functions/telegram-bot/README.md+++ b/examples/edge-functions/supabase/functions/telegram-bot/README.md@@ -9,5 +9,5 @@ Try it out: https://t.me/supabase_example_bot1. Run `supabase functions deploy --no-verify-jwt telegram-bot`2. Get your Telegram token from https://t.me/BotFather3. Run `supabase secrets set TELEGRAM_BOT_TOKEN=your_token FUNCTION_SECRET=random_secret`-4. Set your bot's webhook url to `https://<PROJECT_REFERENCE>.functions.supabase.co/telegram-bot` (Replacing `<...>` with respective values). In order to do that, run this url (in your browser, for example): `https://api.telegram.org/bot<TELEGRAM_BOT_TOKEN>/setWebhook?url=https://<PROJECT_REFERENCE>.functions.supabase.co/telegram-bot?secret=<FUNCTION_SECRET>`-5. That's it, go ahead and chat with your bot π€π¬\ No newline at end of file+4. Set your bot's webhook url to `https://<PROJECT_REFERENCE>.functions.supabase.co/telegram-bot` (Replacing `<...>` with respective values). In order to do that, run this url (in your browser, for example): `https://api.telegram.org/bot<TELEGRAM_BOT_TOKEN>/setWebhook?url=https://<PROJECT_REFERENCE>.supabase.co/functions/v1/telegram-bot?secret=<FUNCTION_SECRET>`+5. That's it, go ahead and chat with your bot π€π¬diff --git a/supabase/functions/og-images/README.md b/supabase/functions/og-images/README.mdindex c2a093815df..dc880c0c010 100644--- a/supabase/functions/og-images/README.md+++ b/supabase/functions/og-images/README.md@@ -1,6 +1,6 @@# Open Graph (OG) Image Generator-Generate OG Images for the sites at supabase.+Generate OG Images for the sites at supabase.## How to use@@ -20,7 +20,7 @@ If any of the required parameters are missing, you will receive a 404 response wHere is an example link that you can use to test the website:-https://obuldanrptloktxcffvn.functions.supabase.co/og-images?site=docs&title=Example%20Title&description=Example%20Description&type=Auth&icon=google+https://obuldanrptloktxcffvn.supabase.co/functions/v1/og-images?site=docs&title=Example%20Title&description=Example%20Description&type=Auth&icon=googleThis link will generate an image for the docs site with the title "Example Title", the description "Example Description", the Auth type, and the Google icon.@@ -33,6 +33,7 @@ supabase start```Then run the function+```bashsupabase functions serve og-images```