Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
express-gateway-plugin-rewrite
Advanced tools
This plugin for Express Gateway makes it possible to redirect (rewrite internally or redirect using HTTP codes) User to the specific URL based on Express Paths or RegExp Rules.
Simply type from your shell environment:
eg plugin install express-gateway-plugin-rewrite
Make sure the plugin is listed in system.config.yml file. This is done automatically for you if you used the command above.
Add the configuration keys to gateway.config.yml file.
policies:
-
rewrite:
-
condition:
name: pathmatch
match: /tina/:code
action:
rewrite: /status/:code
redirect: 302
-
condition:
name: regexpmatch
match: ^/js/(.*)$
action:
rewrite: /src/js/$1
condition.pathmatch
: Express Path corresponding to the url pattern to look for.
condition.regexpmatch
: RegExp corresponding to the url pattern to look for.
Note: if you provide both expression, the first one that will match will make the Gateway jump to the policy directly.
action.rewrite
: Express Path or RegExp corresponding to the url pattern to rewrite. The format should match the
one used in the condition.
action.redirect
: If omitted, a rewrite action will be performed. When set to a number, it'll redirect the request
with the provided status code.
Just check out our plugin development guide. We can't wait to see your custom stuff in the Gateway!
FAQs
Rewrite plugin for express-gateway
We found that express-gateway-plugin-rewrite 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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.