Skip to content

451labs/deflect-451-tools

Repository files navigation

Deflect 451 Tools

The Deflect 451 Tools package simplifies the process of integrating 451 Tools into Deflect. Follow the steps below to get started:

Installation

  1. Clone this repository:
git clone https://github.com/ZamanehMedia/deflect-451-tools.git
  1. Install dependencies:
npm install

Usage

Generate the required files by running the following command:

npm run build --mirrors='"https://example.com/"'

The --mirrors argument can accept multiple items, separated by a comma without spaces. For example:

--mirrors='"https://example.com/","https://example.two.com/"'

If the --mirrors argument is not passed, a __MIRRORS__ placeholder value will be inserted instead in dist/451-tools-configuration.json. This placeholder can be used to dynamically replace the mirrors after build time. You must replace this placeholder with the actual mirror URLs at a later moment, using a value like this: "https://example.com/", "https://example.two.com/".

This command will generate the following files:

  • dist/451-tools.js
  • dist/451-tools-registration.js
  • dist/451-tools-configuration.json

Make sure to serve all files in the website's root. Import 451-tools-registration.js in every page, either inline it or use a script tag.

About

Implementation of the 451 Tools client-side proxy for bootstrapping on the Deflect CDN network

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors