From 736cf98c128449871789a9f64cd62a552a34a573 Mon Sep 17 00:00:00 2001 From: "Tara Z. Manicsic" Date: Fri, 18 Feb 2022 23:24:04 -0500 Subject: [PATCH] reworks redirect documentation Co-authored-by: Prince Wilson --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 95a8b2e..84599f9 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ $ npm run generate In the [`netlify.toml`](./netlify.toml) configuration file there is an example of how to implement redirects. Redirects can be used to do many things from redirecting Single Page Apps more predictably, redirecting based on country/language to leveraging On-Demand Builders for [Distributed Persistant Rendering](https://www.netlify.com/blog/2021/04/14/distributed-persistent-rendering-a-new-jamstack-approach-for-faster-builds/). -In the example we'll be using redirects to have a more simplified call to Netlify functions. Technically when you call a function you will be making a call to `https://yoursite.netlify.com/.netlify/functions/functionName`. In order to make a cleaner path we'll redirect all calls from a path including `/api` to call on the Netlify functions. So the path will be simplified to `https://yoursite.netlify.com/api/functionName`, a lot easier to remember too. +In the example we'll be using redirects to have a shorter endpoint to Netlify functions. By default, you call a Netlify function when requesting a path like `https://yoursite.netlify.com/.netlify/functions/functionName`. Instead, we'll redirect all calls from a path including `/api` to call on the Netlify functions. So the path will be `https://yoursite.netlify.com/api/functionName`, a lot easier to remember too. ### Example