services/blocklists/readme.md
author Sylvestre Ledru <sledru@mozilla.com>
Mon, 06 Nov 2017 13:22:06 +0100
changeset 694109 98e2b4ee9775a2a2b5cc1bb8a390bfe901814f38
parent 488281 735f81d9fd96c9d19d3f2fdfda29a14c1a066d22
child 671097 9f29f6defe4f16c8c2bb4ec916f888d8e56ee598
child 796037 a35fc68a24710f1fe7ed3a7a267f0f8158a9819a
permissions -rw-r--r--
reformat all MozReview-Commit-ID: ApY4gI1IbKr

# Blocklist

The blocklist entries are synchronized locally from the Firefox Settings service.

https://firefox.settings.services.mozilla.com

In order to reduce the amount of data to be downloaded on first synchronization,
a JSON dump from the records present on the remote server is shipped with the
release.

## How to update the JSON files ?

Even though it is not a problem if the dumps are not up-to-date when shipped, here
are the commands to update them:

```
SERVICE_URL="https://firefox.settings.services.mozilla.com/v1"

curl "$SERVICE_URL/buckets/blocklists/collections/certificates/records?"  > services/blocklists/certificates.json
curl "$SERVICE_URL/buckets/blocklists/collections/gfx/records?"  > services/blocklists/gfx.json
curl "$SERVICE_URL/buckets/blocklists/collections/plugins/records?"  > services/blocklists/plugins.json
curl "$SERVICE_URL/buckets/blocklists/collections/addons/records?"  > services/blocklists/addons.json

curl "$SERVICE_URL/buckets/pinning/collections/pins/records?"  > services/blocklists/pins.json
```

## TODO

- Setup a bot to update it regularly.