Skip to content

Instantly share code, notes, and snippets.

@Tahul
Last active January 4, 2021 00:55
Show Gist options
  • Save Tahul/7c6cca469bd02897de77a842921a5f58 to your computer and use it in GitHub Desktop.
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
# 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