The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Some trivial fixes to Edge Function guides (#46092)
Lakshan Perera4363dbb975f5
diff --git a/apps/docs/content/guides/functions/cors.mdx b/apps/docs/content/guides/functions/cors.mdxindex 46d7c4375b7..2b48518de9c 100644--- a/apps/docs/content/guides/functions/cors.mdx+++ b/apps/docs/content/guides/functions/cors.mdx@@ -52,7 +52,7 @@ This approach ensures that when new headers are added to the Supabase SDK, your#### For versions before 2.95.0-If you're using `@supabase/supabase-js` before v2.95.0, you'll need to hardcode the CORS headers. Add a `cors.ts` file within a [`_shared` folder](/docs/guides/functions/quickstart#organizing-your-edge-functions):+If you're using `@supabase/supabase-js` before v2.95.0, you'll need to hardcode the CORS headers. Add a `cors.ts` file within a [`_shared` folder](/docs/guides/functions/development-environment#recommended-project-structure):```ts _shared/cors.tsexport const corsHeaders = {diff --git a/apps/docs/content/guides/functions/development-environment.mdx b/apps/docs/content/guides/functions/development-environment.mdxindex 50b3c29fca8..4f75500e896 100644--- a/apps/docs/content/guides/functions/development-environment.mdx+++ b/apps/docs/content/guides/functions/development-environment.mdx@@ -42,7 +42,7 @@ Set up your editor environment for proper TypeScript support, autocompletion, an```json{"deno.enablePaths": ["./supabase/functions"],- "deno.importMap": "./supabase/functions/import_map.json"+ "deno.importMap": "./supabase/functions/deno.json"}```@@ -76,7 +76,7 @@ It's recommended to organize your functions according to the following structure```bash└── supabase├── functions- │ ├── import_map.json # Top-level import map+ │ ├── deno.json # Top-level Deno configuration│ ├── _shared # Shared code (underscore prefix)│ │ ├── supabaseAdmin.ts # Supabase client with SECRET key│ │ ├── supabaseClient.ts # Supabase client with PUBLISHABLE keydiff --git a/apps/docs/content/guides/functions/examples/auth-send-email-hook-react-email-resend.mdx b/apps/docs/content/guides/functions/examples/auth-send-email-hook-react-email-resend.mdxindex b43513e87fa..e21a4dfab24 100644--- a/apps/docs/content/guides/functions/examples/auth-send-email-hook-react-email-resend.mdx+++ b/apps/docs/content/guides/functions/examples/auth-send-email-hook-react-email-resend.mdx@@ -116,7 +116,7 @@ Deno.serve(async (req) => {### 3. Create React Email templates-Create a new folder `_templates` and create a new file `magic-link.tsx` with the following code:+Create a new `_templates` folder following the [recommended project structure](/docs/guides/functions/development-environment#recommended-project-structure) and add a new `magic-link.tsx` file with the following code:```tsx supabase/functions/send-email/_templates/magic-link.tsximport {diff --git a/apps/docs/content/guides/functions/quickstart-dashboard.mdx b/apps/docs/content/guides/functions/quickstart-dashboard.mdxindex 7fae4fc918f..4412d30a293 100644--- a/apps/docs/content/guides/functions/quickstart-dashboard.mdx+++ b/apps/docs/content/guides/functions/quickstart-dashboard.mdx@@ -151,6 +151,12 @@ There is currently **no version control** for edits! The Dashboard's Edge FunctiNow that your function is deployed, you can invoke it from within your app:+<Admonition type="note" label="Calling an Edge Function from the browser?">++Make sure your function can handle [CORS](/docs/guides/functions/cors) (Cross-Origin Resource Sharing) requests by configuring its headers correctly.++</Admonition>+<Tabsscrollablesize="small"diff --git a/apps/docs/content/guides/functions/quickstart.mdx b/apps/docs/content/guides/functions/quickstart.mdxindex 3d9c3e064e4..600e268ff9a 100644--- a/apps/docs/content/guides/functions/quickstart.mdx+++ b/apps/docs/content/guides/functions/quickstart.mdx@@ -215,6 +215,12 @@ curl --request POST 'https://[YOUR_PROJECT_ID].supabase.co/functions/v1/hello-woNow that your function is deployed, you can invoke it from within an app:+<Admonition type="note" label="Calling from the browser?">++Make sure your function can handle [CORS](/docs/guides/functions/cors) (Cross-Origin Resource Sharing) requests by configuring its headers correctly.++</Admonition>+<Tabsscrollablesize="small"