Hello!
I have been working on a small project to display a build matrix for TravisCI using Netlify functions. I have a basic version working, but it has a super clunky API with a couple of required query parameters. I would like to clean this up a bit by moving those required parameters to path segments (e.g. /:owner/:repo/badge-v1.svg
instead of /badge-v1.svg?owner=:owner&repo=:repo
).
I have tried something like this (to no avail):
[[redirects]]
from = "/:owner/:repo/badge-v1.svg"
to = "/.netlify/functions/badge-v1"
query = { owner = ":owner", repo = ":repo" }
status = 200
Is there a way to accomplish this with rewrites?
Thanks!