openfoodfacts / power-user-script

User script for your browser, to empower Open Food Facts contribution
GNU Affero General Public License v3.0
12 stars 5 forks source link

Manage CORS issues #62

Open CharlesNepote opened 2 years ago

CharlesNepote commented 2 years ago

Some features are broken due to cors issues (flag products, tests if the product exist on OBF, OPF...).

The cors proxy we were using is not working anymore: https://cors-anywhere.herokuapp.com/

We seem to have three options:

  1. Install a cors proxy
  2. Modify cors configuration of OFF websites
  3. Modify Power User Script to manage cors issues.

1. Creating a cors proxy

This option is interesting because it allows to avoid these kinds of issues for various types of usages. Some interesting links to investigate:

3. Modifying Power User Script

Some libraries seem to manage cors issues in user scripts:

See also: https://addons.mozilla.org/fr/firefox/addon/cors-everywhere/