
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
clean-urls
Advanced tools
Express/Connect middleware to serve static files from cleaner, extensionless urls
Express/Connect middleware to serve static files from cleaner, extensionless urls.
Clean urls are only used for .html
files. Useful for sites like blogs that are generated from static site generators such as Jekyll.
npm install clean-urls --save
var express = require('express');
var cleanUrls = require('clean-urls');
var app = express();
app.use(cleanUrls(['/app/**']));
app.listen(3000, function () {
});
rules
- OPTIONAL - this is where you define which paths get treated for clean urls. Values can be blank, true
, false
, a glob-like string (/app/**/*.html
), or an array of globs.options
root
- root directory of your static files. This is used to determine if the url maps a static file and to serve those static files.index
- name if the directory index file. Defaults to index.html
. This is used to redirect you to the directory url instead of the index url and to serve the index file if it is a directory url.npm install
npm test
FAQs
Express/Connect middleware to serve static files from cleaner, extensionless urls
We found that clean-urls 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
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.