
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
@progfay/nextjs-ssg-rewrite-rule-gen
Advanced tools
generate nginx rewrite rules for Next.js SSG (Pages Router)
@progfay/nextjs-ssg-rewrite-rule-genNext.js supports Static Exports.
However, it's a lot of work to manage the routing for the generated file without Vercel. Dynamic Routes feature makes routing more difficult.
This application automatically generates nginx rewrite rules for generated files.
npm install -D @progfay/nextjs-ssg-rewrite-rule-gen
[!NOTE] This application is available with zero configuration.
You can run this application with config in following command: nextjs-ssg-rewrite-rule-gen --config config.json
{
"pagesDirPath": "apps/src/pages",
"ignoreRoutes": ["/debug"],
"nginxConfigs": [
{
"pattern": "^/credential$",
"directives": ["add_header Cache-Control \"no-store\";"]
}
],
"basePath": "/app",
"trailingSlash": true
}
Available configs:
pagesDirPath: customize path for pages directoryignoreRoutes: exclude specific paths from outputsnginxConfigs: customize configuration inside of nginx location directive
pattern: pattern string of RegExpdirectives: additional nginx directivesbasePath: next.config.js Options: basePath | Next.jstrailingSlash: next.config.js Options: trailingSlash | Next.jspages directory:
pages
└── user
├── [id]
└── index.js
└── new
└── index.js
↓
Generated files with Static Exports (next build and output: "export"):
out
└── user
├── [id].html
└── new.html
↓
nginx rewrite rules (generated by @progfay/nextjs-ssg-rewrite-rule-gen):
location ~ ^/user/new/?$ {
rewrite ^/user/new/?$ /user/new.html break;
}
location ~ ^/user/[^/]+?/?$ {
rewrite ^/user/[^/]+?/?$ /user/[id].html break;
}
FAQs
generate nginx rewrite rules for Next.js SSG (Pages Router)
The npm package @progfay/nextjs-ssg-rewrite-rule-gen receives a total of 1,247 weekly downloads. As such, @progfay/nextjs-ssg-rewrite-rule-gen popularity was classified as popular.
We found that @progfay/nextjs-ssg-rewrite-rule-gen 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.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.