An open API service indexing awesome lists of open source software.

https://github.com/fingerprintjs/fingerprint-pro-fastly-vcl-integration

Fingerprint Pro Fastly VCL Integration is responsible for proxying identification and JavaScript agent download requests that are performed on your Fastly infrastructure.
https://github.com/fingerprintjs/fingerprint-pro-fastly-vcl-integration

bot bot-detection botd browser browser-fingerprinting detection fastly fastly-vcl fingerprint fingerprinting fingerprintjs fingerprintjs-pro identifier varnish vcl visitor visitor-identifier

Last synced: 2 days ago
JSON representation

Fingerprint Pro Fastly VCL Integration is responsible for proxying identification and JavaScript agent download requests that are performed on your Fastly infrastructure.

Awesome Lists containing this project

README

          






Fingerprint logo




Current version
MIT license
Discord server

# Fingerprint Pro Fastly VCL Proxy Integration

[Fingerprint](https://fingerprint.com) is a device intelligence platform offering industry-leading accuracy.

Fingerprint Fastly VCL Proxy Integration is responsible for proxying identification and agent-download requests between your website and Fingerprint through your Fastly infrastructure via [VCL](https://www.fastly.com/documentation/guides/vcl/using/). The integration consists of a custom VCL file you can add to your Fastly CDN Service.

## 🚧 Requirements and expectations

- **Limited to Enterprise plan**: The Fastly VCL Proxy Integration is exclusively supported for customers on the **Enterprise** Plan. Other customers are encouraged to use [Custom subdomain setup](https://dev.fingerprint.com/docs/custom-subdomain-setup) or [Cloudflare Proxy Integration](https://dev.fingerprint.com/docs/cloudflare-integration).

- **Manual updates occasionally required**: The underlying data contract in the identification logic can change to keep up with browser updates. Using the Fastly VCL Proxy Integration might require occasional manual updates on your side. Ignoring these updates will lead to lower accuracy or service disruption.

## Getting started

This is a quick overview of the installation setup. For detailed step-by-step instructions, see the [Fastly VCL proxy integration guide in our documentation](https://dev.fingerprint.com/docs/fastly-vcl-proxy-integration).

1. Go to Fingerprint **Dashboard** > [**API Keys**](https://dashboard.fingerprint.com/api-keys) and click **Create Proxy Key** to create a proxy secret. You will use it later to authenticate your requests to Fingerprint APIs.
2. Create a Dictionary in your Fastly CDN Service named `fingerprint_config` and add the following values:

| Key | Example Value | Description |
| -------------------------- | -------------------- | ------------------------------------------------------- |
| PROXY_SECRET | 6XI9CLf3C9oHSB12TTaI | Fingerprint proxy secret generated in Step 1 |
| INTEGRATION_PATH | 02mbd3 | Random path prefix for proxy integration endpoints |
| AGENT_SCRIPT_DOWNLOAD_PATH | z5kms2 | Random path segment for downloading the JS agent |
| GET_RESULT_PATH | nocmjw | Random path segment Fingerprint identification requests |

3. Go to [Releases](https://github.com/fingerprintjs/fingerprint-pro-fastly-vcl-integration/releases) to download the latest `fingerprint-pro-fastly-vcl-integration.vcl` template file.
4. Paste the template file contents to your Fastly CDN Service's **Custom VCL**.
5. Configure the Fingerprint [JS Agent](https://dev.fingerprint.com/docs/js-agent) on your website using the paths defined in Step 2.

```javascript
import * as FingerprintJS from '@fingerprintjs/fingerprintjs-pro'

const fpPromise = FingerprintJS.load({
apiKey: 'PUBLIC_API_KEY',
scriptUrlPattern: [
'https://yourwebsite.com/INTEGRATION-PATH/AGENT_SCRIPT_DOWNLOAD_PATH?apiKey=&version=&loaderVersion=',
FingerprintJS.defaultScriptUrlPattern, // Fallback to default CDN in case of error
],
endpoint:
'https://yourwebsite.com/INTEGRATION-PATH/GET_RESULT_PATH?region=us',
FingerprintJS.defaultEndpoint // Fallback to default endpoint in case of error
],
});
```

See the [Fastly VCL proxy integration guide](https://dev.fingerprint.com/docs/fastly-vcl-proxy-integration#step-4-configure-the-fingerprint-javascript-agent-on-your-client) in our documentation for more details.

## Customizing the template

If you need to customize the template configuration, you can clone this repository and build the template locally with custom parameters.

1. Clone the repository: `git clone https://github.com/fingerprintjs/fingerprint-pro-fastly-vcl-integration`
2. Run `pnpm install`
3. Build the VCL file with `pnpm build`
- **`--config-table-name` (Optional, default: `fingerprint_config`):** Identifier name for Fastly VCL's dictionary to store Fingerprint related variables
- **`--fpcdn-domain` (Optional, default: `fpcdn.io`):** Domain to request agent script from
- **`--fpjs-domain` (Optional, default: `api.fpjs.io`):** Domain to make user identification requests
- **`--max-connections` (Optional, default: `200`):** Fastly CDN Service maximum number of requests per second limit for each origin
4. Copy `dist/fingerprint-pro-fastly-vcl-integration.vcl` file's contents.
5. Paste contents to your Fastly CDN Service's **Custom VCL**.

If you have any questions, reach out to our [support team](https://fingerprint.com/support).

## License

This project is licensed under the [MIT license](LICENSE).