Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make CORS work on dev server and API v3 #8392

Merged
merged 8 commits into from
May 11, 2023
Merged

fix: make CORS work on dev server and API v3 #8392

merged 8 commits into from
May 11, 2023

Conversation

stephanegigandet
Copy link
Contributor

  • add the Authorization header (needed on .dev and .net)
  • return a 200 response instead of 404 when we have an OPTIONS request for a product that does not exist: we don't execute the request, we just validate that the browser can make it
  • added some tests

@stephanegigandet stephanegigandet requested a review from a team as a code owner May 3, 2023 13:11
@github-actions github-actions bot added API Issues related to the Open Food Facts API. More specific labels exist & should be used (API WRITE…) API v3 API WRITE WRITE API to allow sending product info and image 🧪 tests labels May 3, 2023
Copy link
Member

@alexgarel alexgarel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great

@codecov-commenter
Copy link

codecov-commenter commented May 5, 2023

Codecov Report

Merging #8392 (d117690) into main (a43c187) will not change coverage.
The diff coverage is 0.00%.

@@           Coverage Diff           @@
##             main    #8392   +/-   ##
=======================================
  Coverage   48.44%   48.44%           
=======================================
  Files         113      113           
  Lines       21251    21251           
  Branches     4767     4767           
=======================================
  Hits        10296    10296           
  Misses       9674     9674           
  Partials     1281     1281           
Impacted Files Coverage Δ
lib/ProductOpener/API.pm 16.66% <0.00%> (ø)
lib/ProductOpener/HTTP.pm 86.84% <ø> (ø)
tests/unit/http.t 100.00% <ø> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API v3 API WRITE WRITE API to allow sending product info and image API Issues related to the Open Food Facts API. More specific labels exist & should be used (API WRITE…) 🧪 tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants