
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
hostname-rewrites
Advanced tools
> If you're building a Platforms on Vercel, this example is for you.
If you're building a Platforms on Vercel, this example is for you.
In this example, you'll learn how to programmatically create unique content pages for your users with a multi-tenant infrastructure using Edge Middleware. Each user gets assigned a unique subdomain when they create their account, with the (usually paid) option to add a custom domain.
For context, here are some example pages:
All of these generated sites are powered by ISR (no SSR at all) so they load pretty much instantly + the inter-page transitions are lightning fast.
The example above is generated based on the following mock database:
const mockDB = [
{name: "Site 1", description: "Subdomain + custom domain", subdomain: "subdomain-1", customDomain: "custom-domain-1.com"},
{name: "Site 2", description: "Subdomain only", subdomain: "subdomain-2", customDomain: null},
{name: "Site 3", description: "Subdomain only", subdomain: "subdomain-3", customDomain: null},
]
When deploying your own clone of this example, you will need to replace the data fetching methods in getStaticPaths and getStaticProps with your own database of choice (BYOD, Bring-Your-Own-Database).
To give a bit of context of how this can be applied in a real-world context, here's a starter kit that we're currently working on – it's basically a Substack clone with subdomains + custom domains functionality:
We will be releasing this starter kit very soon, so stay tuned!
You can choose from one of the following two methods to use this repository:
Deploy the example using Vercel:
Download this repository via git:
git clone https://github.com/vercel-customer-feedback/edge-functions.git
Execute create-next-app with npm or Yarn to bootstrap the example:
npx create-next-app --example edge-middleware/examples/hostname-rewrites hostname-rewrites
# or
yarn create next-app --example edge-middleware/examples/hostname-rewrites hostname-rewrites
Deploy it to the cloud with Vercel (Documentation).
💡 Do note that you will need to replace the
ROOT_URLvariable in the.env.examplefile with your domain of choice and add that domain as a wildcard domain your Vercel project.
FAQs
> If you're building a Platforms on Vercel, this example is for you.
The npm package hostname-rewrites receives a total of 0 weekly downloads. As such, hostname-rewrites popularity was classified as not popular.
We found that hostname-rewrites 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.

Research
A malicious package uses a QR code as steganography in an innovative technique.

Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.