New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@nestjs-shopify/common

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nestjs-shopify/common

[@shopify/shopify-node-api](https://github.com/Shopify/shopify-node-api) to setup your Shopify context in a NestJS application. This library was generated with [Nx](https://nx.dev).

  • 2.0.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
314
increased by10.56%
Maintainers
0
Weekly downloads
 
Created
Source

@nestjs-shopify/common

@shopify/shopify-node-api to setup your Shopify context in a NestJS application. This library was generated with Nx.

Installation

npm i @shopify/shopify-api @nestjs-shopify/core @nestjs-shopify/express @nestjs-shopify/common

or using Yarn:

yarn add @shopify/shopify-api @nestjs-shopify/core @nestjs-shopify/express @nestjs-shopify/common

Usage

Run nx test common to execute the unit tests via Jest.

CSP middleware

The library provides a CSP middleware that you can use to protect your application from XSS attacks. The middleware is not applied by default. To make use of this middleware, add the following to your application root module:

// app.module.ts
import { ShopifyCspMiddleware } from '@nestjs-shopify/common';
import { ShopifyExpressModule } from '@nestjs-shopify/express';
import { Module, NestModule } from '@nestjs/common';

@Module({
  imports: [
    ShopifyExpressModule.forRoot({ ... }),
    // ...
  ],
})
export class AppModule implements NestModule {
  configure(consumer: MiddlewareConsumer) {
    // Apply the middleware to all routes
    consumer.apply(ShopifyCspMiddleware).forRoutes('*');

    // Or apply the middleware to specific routes
    consumer
      .apply(ShopifyCspMiddleware)
      .exclude('cats')
      .forRoutes({ path: 'ab*cd', method: RequestMethod.ALL });
  }
}

FAQs

Package last updated on 20 Jul 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc