diff --git a/apps/docs/content/guides/functions/cors.mdx b/apps/docs/content/guides/functions/cors.mdx index 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.ts export const corsHeaders = { diff --git a/apps/docs/content/guides/functions/development-environment.mdx b/apps/docs/content/guides/functions/development-environment.mdx index 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 key diff --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.mdx index 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.tsx import { diff --git a/apps/docs/content/guides/functions/quickstart-dashboard.mdx b/apps/docs/content/guides/functions/quickstart-dashboard.mdx index 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 Functi Now that your function is deployed, you can invoke it from within your app: + + +Make sure your function can handle [CORS](/docs/guides/functions/cors) (Cross-Origin Resource Sharing) requests by configuring its headers correctly. + + + + +Make sure your function can handle [CORS](/docs/guides/functions/cors) (Cross-Origin Resource Sharing) requests by configuring its headers correctly. + + +