We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug:
Using splat in sending query parameters to a destination doesn't seem to be working.
splat
To reproduce:
Add the following to your netlify.toml:
netlify.toml
[[redirects]] force = true from = "/foo/*" status = 301 to = "/.netlify/functions/bar/?url=:splat"
Create a function with the following:
exports.handler = async ({queryStringParameters}) => { return { body: JSOSN.strigify(queryStringParameters), statusCode: 200 } }
The output returns empty.
Configuration
System: OS: macOS 12.2.1 CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz Memory: 1.44 GB / 16.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 14.17.5 - ~/.nvm/versions/node/v14.17.5/bin/node npm: 6.14.14 - ~/.nvm/versions/node/v14.17.5/bin/npm npmPackages: netlify-cli: ^9.4.0 => 9.4.0
Expected behavior
The query string should have some value if the requested URL was /foo/bar/.
/foo/bar/
CLI Output
N/A
Additional context
The text was updated successfully, but these errors were encountered:
Observations so far: I'm seeing this bug on a local environment with netlify dev on v9.6.4 as well as a local clone of netlify/cli.
netlify dev
netlify/cli
It however doesn't seem to be the case in production, testing using code in this repo. For example:
{"url":""}
{"url":"bar"}
Currently investigating local env behavior.
Sorry, something went wrong.
@jackiewmacharia It seems like this was done intentionally to match old production behaviour.
See #1605
Relevant code is here:
cli/src/utils/proxy.js
Lines 204 to 216 in 7b89caf
jackiewmacharia
Successfully merging a pull request may close this issue.
Describe the bug:
Using
splat
in sending query parameters to a destination doesn't seem to be working.To reproduce:
Add the following to your
netlify.toml
:Create a function with the following:
The output returns empty.
Configuration
Expected behavior
The query string should have some value if the requested URL was
/foo/bar/
.CLI Output
N/A
Additional context
N/A
The text was updated successfully, but these errors were encountered: