
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
@helloample/netlify-plugin-redirects
Advanced tools
Read a CSV file, parse the rows and write them to `_redirects` _before_ Netlify processes your build.
Read a CSV file, parse the rows and write them to _redirects
before Netlify processes your build.
Netlify's _redirects
file does not support environment variables or context. With this build, you can specify environmentally specific redirect rules in a CSV file and then dynamically write those rules to _redirects
before your site is deployed.
Create a new file called redirects.csv
and put it in the root of your application directory (example). Each row in your CSV file should contain the following columns:
Source | Destination | Status | Context |
---|---|---|---|
This is the path you want to match | This is the destination for your rule | The status code associated with the rule, eg. 301 , 200! , etc. | Comma delimited string of branch names for your deployment context, leave this column blank for "no context" |
If you have defined a context for a rule, it will only be rendered for when the current branch name is included within that column; if you have not defined a context, that rule will be deployed everywhere.
When referring to exported environment variables, you need to use the following convention in your CSV...
${env:SOME_ENV_VARIABLE}
You can tell the plugin where to source your rules and where to write the parsed redirects via the following options, in your netlify.toml
file...
source
: Specifies the location of your CSV file.destination
: Specifies the file to which the parsed rules will be written.defaultBranch
: The default branch for your repo. This value is used when context cannot be determined.The default configuration, if none is specified, is:
[[plugins]]
package = "./_plugins/netlify-plugin-redirects"
[plugins.inputs]
source = "./redirects.csv"
destination = "./_redirects"
defaultBranch = "master"
This project is licensed under the MIT License.
FAQs
Read a CSV file, parse the rows and write them to `_redirects` _before_ Netlify processes your build.
The npm package @helloample/netlify-plugin-redirects receives a total of 239 weekly downloads. As such, @helloample/netlify-plugin-redirects popularity was classified as not popular.
We found that @helloample/netlify-plugin-redirects demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.