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: add CORS to config, improve test #654

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fetsorn
Copy link
Contributor

@fetsorn fetsorn commented Feb 18, 2025

Hotfix for #516, I've corrected the test case and added CORS to the default config.

  • prepend c.HTTP.PublicURL to c.HTTP.CORS.AllowedOrigins in the Config.Validate() function.
  • make the testscript case more readable
  • hint a custom allowed origin in the config
  • enable PUT and OPTIONS in default config

fetsorn added a commit to fetsorn/soft-serve that referenced this pull request Feb 18, 2025
@fetsorn fetsorn changed the title fix: add CORS to config, improve test (#516) fix: add CORS to config, improve test Feb 18, 2025
Copy link

codecov bot commented Feb 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 51.76%. Comparing base (b06b555) to head (4941bcd).
Report is 136 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #654      +/-   ##
==========================================
- Coverage   51.96%   51.76%   -0.20%     
==========================================
  Files         157      159       +2     
  Lines       13454    13569     +115     
==========================================
+ Hits         6991     7024      +33     
- Misses       5891     5973      +82     
  Partials      572      572              

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

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@fetsorn fetsorn force-pushed the cors branch 2 times, most recently from 53a164e to c2b7598 Compare March 12, 2025 09:21
@fetsorn fetsorn requested a review from aymanbagabas March 12, 2025 09:24
@aymanbagabas
Copy link
Member

Thank you for the changes @fetsorn! I will merge once the tests pass

@fetsorn
Copy link
Contributor Author

fetsorn commented Mar 12, 2025

I also added several allowed headers needed for preflight requests

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