Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
roots-netlify
Advanced tools
A roots extension for creating Netlify configuration files.
Note: This project is in early development, and versioning is a little different. Read this for more details.
Netlify is a great static hosting platform that allows developers to add powerful features to their static sites, like redirects & rewrites and headers & basic auth.
This abstracts Netlify's config files into your app.coffee
with the rest of your configs so they can be one big happy family. This also allows you to create different Netlify configs based on your roots environment.
It's also a common roots convention to start files with an _
to ignore them during compilation. Since Netlify would normally be configured with a _headers
and _redirects
file, using this extension allows you keep that nice clean convention throughout the whole project.
npm install roots-netlify --save
app.coffee
file to include the extension, as suchnetlify = require 'roots-netlify'
module.exports =
extensions: [
netlify
redirects:
'/news': '/blog'
'/news/:year/:month:/:date/:slug': '/blog/:year/:month/:date/:story_id'
'/news/*': '/blog/:splat'
'302':
'/temp_redirect': '/'
'404':
'/ecommerce': '/closed'
rewrites:
'/*': '/index.html'
headers:
'/protected/path':
'Cache-Control': 'max-age: 3000'
'Basic-Auth': 'username:password'
'/*':
'X-Frame-Options': 'DENY'
'X-XSS-Protection': '1; mode=block'
]
Read the Netlify documentation on redirects and headers to learn more.
Redirects added to the redirects
object return a status code of 301
while those added to the rewrites
object will return 200
(a rewrite). Netlify also supports two other status codes: 302
and 404
. In order to configure your redirects for these, add a 302
or 404
key to redirects
and nest your configuration object there (see example above).
FAQs
A roots extension for configuring netlify
The npm package roots-netlify receives a total of 0 weekly downloads. As such, roots-netlify popularity was classified as not popular.
We found that roots-netlify demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.