Last active
January 4, 2021 00:55
-
-
Save Tahul/7c6cca469bd02897de77a842921a5f58 to your computer and use it in GitHub Desktop.
[Redirect Netlify Functions To `/api`] Simple snippet for netlify.toml to redirect /.netlify/function/:functionName to /api/:functionName #netlify #redirect #api #functions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Taken from Netlify Community answer from Luke (Support Engineer @ Netlify) | |
# URL: https://community.netlify.com/t/trying-to-redirect-from-api-endpoint-to-netlify-functions-servers-endpoint/7609/10 | |
[[redirects]] | |
from = "/api/*" | |
to = "/.netlify/functions/:splat" | |
status = 200 | |
force = true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment