Skip to main content
This guide covers upgrading the Fastly Compute proxy integration from v0.3 to v0.4. The new version adds support for JavaScript agent v4 while maintaining compatibility with v3, and also includes the following breaking changes:
  • Single backend: The integration now uses one backend named fingerprint instead of region-specific backend names (api.fpjs.io, eu.api.fpjs.io, ap.api.fpjs.io). The fpcdn.io (CDN) backend has also been removed. Agent script downloads now go through the same fingerprint backend.
  • Plugin system removed: Open Client Response plugins, sealed result decryption, and KV store saving are no longer supported.
  • Path variables now optional: AGENT_SCRIPT_DOWNLOAD_PATH and GET_RESULT_PATH are only needed for backward compatibility with JavaScript agent v3.

Migration overview

  1. Upgrade the proxy integration to v0.4. Choose the migration path that matches how you deployed your integration: using Terraform or manually.
  2. Switch to JavaScript agent v4.
  3. Remove the plugin configuration resources (if you were using them).

Migrate using Terraform

Step 1: Add the region variable

Add the region variable to your module configuration. Set it to the region of your Fingerprint workspace:
module "fingerprint_fastly_compute_integration" {
  source             = "fingerprintjs/compute-fingerprint-proxy-integration/fastly"
  fastly_api_token   = "FASTLY_API_TOKEN"
  integration_domain = "metrics.yourwebsite.com"
  service_id         = "FASTLY_COMPUTE_SERVICE_ID"
  region             = "us" # or "eu" or "ap"
  # agent_script_download_path and get_result_path are only needed for JS agent v3
}
You can also remove kv_store_enabled = true if you had it set, see Removing plugin configuration resources for more details.

Step 2: Apply the Terraform changes

terraform apply
Terraform automatically replaces the old region-specific backends and the fpcdn.io backend with a single fingerprint backend. If you had kv_store_enabled = true, the KV Store is also destroyed.

Migrate manually

Step 1: Update the proxy package

  1. Go to the latest release in the Fastly Compute Proxy Integration GitHub repository and download fingerprint-fastly-compute-proxy-integration.tar.gz.
  2. In Fastly, open your proxy integration Compute service and go to Package.
  3. Upload the new package and click Activate.

Step 2: Replace the service backends

Replace all existing backends with a single backend named fingerprint:
  1. In Fastly, open your proxy integration Compute service and go to Origins.
  2. Add a new backend:
    • Set the Name to fingerprint. The proxy integration expects this exact name.
    • Set the Address and Override host to the Fingerprint API host for your workspace region:
      • api.fpjs.io — Global (US)
      • eu.api.fpjs.io — EU
      • ap.api.fpjs.io — Asia
  3. Delete the old region-specific backends (api.fpjs.io, eu.api.fpjs.io, ap.api.fpjs.io) and the CDN backend (fpcdn.io).
  4. Click Activate to deploy the changes.

Switch to JavaScript agent v4

With the proxy upgraded, update your JavaScript agent to v4. See Migrating from JavaScript agent v3 to v4 for more details.
import * as FingerprintJS from '@fingerprintjs/fingerprintjs-pro'
import * as Fingerprint from '@fingerprint/agent'

const fpPromise = FingerprintJS.load({ 
const fp = Fingerprint.start({ 
  apiKey: 'PUBLIC_API_KEY',
  scriptUrlPattern: [ 
    'https://metrics.yourwebsite.com/AGENT_SCRIPT_DOWNLOAD_PATH?apiKey=<apiKey>&version=<version>&loaderVersion=<loaderVersion>',
    FingerprintJS.defaultScriptUrlPattern,
  ],
  endpoint: [ 
    'https://metrics.yourwebsite.com/GET_RESULT_PATH?region=us',
    FingerprintJS.defaultEndpoint,
  ],
  endpoints: 'https://metrics.yourwebsite.com/', 
  region: 'us', 
})
Note: The ?region=us query parameter inside the endpoints URL is no longer needed.
Once all your clients are on v4, you can also remove AGENT_SCRIPT_DOWNLOAD_PATH and GET_RESULT_PATH from your Config Store and Terraform configuration. They are only needed for JavaScript agent v3 support.

Removing plugin configuration resources (optional)

If you were using the Open Client Response plugins, remove the following resources from your Fastly service.

Remove plugin configuration from your Secret Store

  1. In Fastly, go to Resources > Secret stores.
  2. Open Fingerprint_Compute_Secret_Store_<SERVICE_ID>.
  3. Delete the DECRYPTION_KEY item.
Note: Terraform does not manage Secret Store items. Remove DECRYPTION_KEY manually if you had it set.

Remove plugin configuration from your Config Store

  1. In Fastly, go to Resources > Config stores.
  2. Open Fingerprint_Compute_Config_Store_<SERVICE_ID>.
  3. Delete OPEN_CLIENT_RESPONSE_PLUGINS_ENABLED and SAVE_TO_KV_STORE_PLUGIN_ENABLED if they exist.

Remove the KV Store

If you had the KV Store plugin enabled, remove the associated KV Store resource.

Manually

  1. In Fastly, go to Resources > KV Stores.
  2. Find Fingerprint_Results_<SERVICE_ID>, unlink it from your service, and delete it.

Using Terraform

  1. In Terraform, remove the kv_store_enabled variable from your module configuration.
  2. Run terraform apply to remove the KV Store resource.