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

CORS support #23

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

domino91
Copy link

@domino91 domino91 commented Jul 4, 2023

No description provided.

Copy link
Owner

@bpolaszek bpolaszek left a comment

Choose a reason for hiding this comment

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

Hello there,

Sorry for taking so long to review this! 😬
If you're still eager to contribute, I required some minor changes.

Thanks a lot!
Ben

src/Hub/Middleware/CorsMiddleware.php Outdated Show resolved Hide resolved
src/Hub/Middleware/CorsMiddleware.php Show resolved Hide resolved
src/Hub/Middleware/CorsMiddleware.php Show resolved Hide resolved
Copy link

codecov bot commented Oct 15, 2024

Codecov Report

Attention: Patch coverage is 81.81818% with 2 lines in your changes missing coverage. Please review.

Project coverage is 99.54%. Comparing base (6fc70c7) to head (88585d8).
Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
src/Hub/Middleware/CorsMiddleware.php 81.81% 2 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##                main      #23      +/-   ##
=============================================
- Coverage     100.00%   99.54%   -0.46%     
- Complexity       138      152      +14     
=============================================
  Files             25       27       +2     
  Lines            396      439      +43     
=============================================
+ Hits             396      437      +41     
- Misses             0        2       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Owner

@bpolaszek bpolaszek left a comment

Choose a reason for hiding this comment

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

Hi @domino91, thanks for getting back on this.
Can you please fix CI (composer linter:fix) and add an integration test?
You could try to issue a GET request to /.well-known/mercure without any topic: it should respond with a 400 Bad Request and you're supposed to see CORS headers in the response.

Some LOC remain uncovered: https://app.codecov.io/gh/bpolaszek/freddie/pull/23/blob/src/Hub/Middleware/CorsMiddleware.php

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants