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

feat: hot-reload CORS origins #3423

Merged
merged 11 commits into from
Aug 16, 2023
Merged

feat: hot-reload CORS origins #3423

merged 11 commits into from
Aug 16, 2023

Conversation

zepatrik
Copy link
Member

@zepatrik zepatrik commented Aug 8, 2023

needs ory/x#713

With this PR, CORS allowed-origins will be hot-reloadable. Is there a good place to put an integration test? Only e2e I guess?

driver/config/cors_test.go Outdated Show resolved Hide resolved
driver/config/cors.go Outdated Show resolved Hide resolved
@zepatrik zepatrik marked this pull request as ready for review August 10, 2023 07:10
@zepatrik zepatrik requested a review from aeneasr as a code owner August 10, 2023 07:10
@aeneasr
Copy link
Member

aeneasr commented Aug 10, 2023

Only e2e I guess?

You can start the server and make an HTTP request to an endpoint with HEAD and the Origin: Header and expect to see correct Cross-Origin-* headers.

driver/config/config.go Outdated Show resolved Hide resolved
aeneasr
aeneasr previously approved these changes Aug 10, 2023
Copy link
Member

@aeneasr aeneasr left a comment

Choose a reason for hiding this comment

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

LGTM please verify that empty domains != allow all domains.

@zepatrik
Copy link
Member Author

Manual testing confirmed it works.

@zepatrik
Copy link
Member Author

Tests are failing because of ory/x bump which does not work on mysql thanks to gobuffalo/pop#829

@codecov
Copy link

codecov bot commented Aug 11, 2023

Codecov Report

Merging #3423 (63d5faf) into master (6b02350) will decrease coverage by 0.01%.
Report is 1 commits behind head on master.
The diff coverage is 72.72%.

❗ Current head 63d5faf differs from pull request most recent head 847a6fe. Consider uploading reports for the commit 847a6fe to get more accurate results

@@            Coverage Diff             @@
##           master    #3423      +/-   ##
==========================================
- Coverage   78.02%   78.01%   -0.01%     
==========================================
  Files         327      327              
  Lines       21402    21406       +4     
==========================================
+ Hits        16698    16699       +1     
- Misses       3466     3468       +2     
- Partials     1238     1239       +1     
Files Changed Coverage Δ
cmd/daemon/serve.go 88.05% <70.00%> (-1.34%) ⬇️
driver/config/config.go 82.62% <100.00%> (+0.02%) ⬆️

@aeneasr aeneasr merged commit 157d934 into master Aug 16, 2023
26 checks passed
@aeneasr aeneasr deleted the feat/cors-origins-hot-reload branch August 16, 2023 06:12
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