Hi! I am having trouble setting up my redirect. I have an oauth link on my site that takes the user to Stripe, which redirects them to my site and has varying parameters depending on what information is filled out on Stripe.
I do not care about passing the parameters through to the redirect because the netlify function they are first directed to saves all of that info to my database.
The from
URL looks like:
http://localhost:8888/.netlify/functions/authorize-connect-account?state=6543AFDA4325cdsa52&scope=read_write&code=ac_352FAS235casd2FAFAS
There may be more parameters than scope
and code
. I am not sure what they will be, but I don’t need to pass them to the to
redirect so I would like to use a wildcard.
The to
URL looks like https://localhost:8888/provider-dashboard
My netlify.toml looks like this (the first redirect works fine):
# example netlify.toml
[build]
command = "yarn build"
functions = "functions"
publish = "public"
## Uncomment to use this redirect for Single Page Applications like create-react-app.
## Not needed for static site generators.
[[redirects]]
from = "/room/*"
to = "/room"
status = 200
[[redirects]]
from = "/.netlify/functions/authorize-connect-account*"
to = "/provider-dashboard"
status = 200
I have tried using query = {state = ":state"}
,
from = "/.netlify/functions/*"
to= "/provider-dashboard:splat"
and have looked at Redirect options | Netlify Docs.
I think the problem might be that I either need to include every query parameter or that the wildcard is not after a /
.
Whatever change I make, I receive the following error Invalid /.netlify path in redirect source
Any help is greatly appreciated!