Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ft-next-barriers

Package Overview
Dependencies
Maintainers
4
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ft-next-barriers

Provides middleware and server-side logic for Barrier Implementation

  • 2.6.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
4
Created
Source

Deprecation notice

The next-barriers project is deprecated and all remaining code has been migrated to inside next-product-selector

More information about why.


next-barriers

Provides middleware and server-side logic for Barrier Implementation

Usage

Add as a dependency in any app that requires barriers, then do:

var barriers = require('ft-next-barriers');

app.use(barriers.middleware);

Required Headers

In order to know which barrier to show and to call the Barrier API the following headers are required. These are all set at the CDN level and will need to be spoofed if running locally.

  • FT-Barrier-Type Set to a valid barrier type (eg 'TRIAL', 'PREMIUM' or 'CORPORATE');
  • FT-Access-Decision Must be 'DENIED' or barrier will not show
  • Country-Code Required by the API - set to any valid iso 3char country country-code (eg 'GBR')
  • FT-Content-Classification Required by the API, can be any valid content classification (eg 'CONDITIONAL_STANDARD' or 'CONDITIONAL_PREMIUM')
  • FT-Session-Token Required by the API - best off set to an empty string. Otherwise needs to be a valid session with a relevant subscription status
  • FT-Cookie-AYSC Not yet required

FAQs

Package last updated on 18 Jan 2016

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