@dgxo/sdk-mashaguard
v1.0.1
Published
Official Node.js SDK for MashaGuard
Maintainers
Readme
@dgxo/sdk-mashaguard
Official Node.js SDK for MashaGuard — Runtime JavaScript Protection & Threat Intelligence Platform.
Installation
npm install @dgxo/sdk-mashaguardEnvironment Variables
MASHAGUARD_API_KEY=MG-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXUsage
Express
const { MashaGuard } = require('@dgxo/sdk-mashaguard');
const masha = new MashaGuard(process.env.MASHAGUARD_API_KEY);
app.use(masha.protect());Next.js App Router
// middleware.js
import { MashaGuard } from '@dgxo/sdk-mashaguard';
const masha = new MashaGuard(process.env.MASHAGUARD_API_KEY);
export default masha.protect();
export const config = { matcher: ['/.masha-handshake'] };Next.js Pages Router
// pages/api/[...masha].js
import { MashaGuard } from '@dgxo/sdk-mashaguard';
const masha = new MashaGuard(process.env.MASHAGUARD_API_KEY);
export default masha.handler();Fastify
const { MashaGuard } = require('@dgxo/sdk-mashaguard');
const masha = new MashaGuard(process.env.MASHAGUARD_API_KEY);
fastify.register(masha.protect());License
Copyright (c) 2026 DGXO. All rights reserved. This software is proprietary and confidential. Unauthorized use is strictly prohibited. Contact: [email protected]
