Netlify Rules Proxy
This is a node middleware that works with express servers, connetct servers, etc, and implementes the full Netlify edge rules engine for your local dev environment.
Usage
const rulesProxy = require("netlify-rules-proxy");
app.use(rulesProxy({ publicFolder: "./dist" }));
Full options:
-
publicFolder
this defines the public folder the_redirects
file gets written to -
jwtSecret
secret for verifying JWT tokens if using role based rules -
jwtRolePath
path when looking up a role in the claims of a JWT