-
Notifications
You must be signed in to change notification settings - Fork 543
11744 CORS: echo request Origin + add Vary #11745
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
Merged
Merged
Changes from all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
618ee4f
11744: CORS: echo request Origin and add Vary: Origin; sanitize CSV l…
ErykKul 75066c5
Centralize CSV parsing (CsvUtil) + CORS origin echo & Vary header imp…
ErykKul ab19665
Make CORS origin list optional in CorsFilter initialization
ErykKul c0a00cf
Merge branch 'develop' into 11744-cors-echo-origin-vary
ErykKul 6fbcdc4
Refactor GlobusOverlayAccessIO and CsvUtil for improved endpoint hand…
ErykKul 012a09d
updated release note and comments
ErykKul 48bbd53
test fixes
ErykKul 16720f6
Clarify CORS requirements for browser-based external tools in documen…
ErykKul ec1bccb
Update CORS documentation to clarify configuration requirements and d…
ErykKul 53c610e
Remove unused CSV lookup methods
ErykKul 01f73c2
Update JvmSettings documentation to clarify CSV list return types
ErykKul 8928d45
Refactor doc structure for improved readability and maintainability
ErykKul 0ded3f9
Merge branch 'develop' into 11744-cors-echo-origin-vary
ErykKul 4c34917
wording
ErykKul 7208c83
Removed deprecated (and removed from code) AllowCors setting from doc
ErykKul fe15c0c
Fix formatting inconsistencies in dataset management documentation
ErykKul f376253
rename: CsvUtil -> ListSplitUtil
ErykKul ce8843e
Refactor CSV list lookup methods to join array elements before splitting
ErykKul d5e13d4
Rename CSV list lookup methods to use 'lookupSplittedList' for consis…
ErykKul c4671d8
revert whitespace changes done by automated formatting tool
ErykKul 7a40183
revert whitespace-only changes done by automatic tool
ErykKul e27a84c
code cleanup
ErykKul 0a9868d
code cleanup
ErykKul ff55c8a
revert whitespace changes done by automated formatting tool
ErykKul a8ec817
revert whitespace changes done by automated formatting tool
ErykKul 3f8ff9a
Merge branch 'develop' into 11744-cors-echo-origin-vary
ErykKul 2f6f6d3
revert whitespace changes done by automated formatting tool
ErykKul 3404e70
revert whitespace changes done by automated formatting tool
ErykKul ed4e5fe
remove legacy dependency on SettingsServiceBean in CorsFilterTest
ErykKul a749db4
refactor: replace Arrays.stream with ListSplitUtil.split in CorsFilter
ErykKul 83e4a10
refactor: replace ListSplitUtil.split with Arrays.stream for list pro…
ErykKul 6c76282
Merge branch 'develop' into 11744-cors-echo-origin-vary
ErykKul 2781a1a
Enhance JvmSettings: Add trimming options for lookupSplittedList meth…
ErykKul d1dce07
Merge branch 'develop' into 11744-cors-echo-origin-vary
ErykKul 8cd6177
Merge branch 'develop' into 11744-cors-echo-origin-vary
ErykKul 65cb6ab
Merge branch 'develop' into 11744-cors-echo-origin-vary
stevenwinship 41b4c25
Merge branch 'develop' into 11744-cors-echo-origin-vary
stevenwinship File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| # 11744: CORS handling improvements | ||
|
|
||
| Modernizes CORS so browser integrations (previewers, external tools, JS clients) work correctly with multiple origins and proper caching. | ||
|
|
||
| ## Highlights | ||
|
|
||
| - Echoes the request origin (`Access-Control-Allow-Origin`) when it matches `dataverse.cors.origin`. | ||
| - Adds `Vary: Origin` for per-origin responses (not for wildcard). | ||
| - Supports comma‑separated origin list; any `*` in the list = wildcard mode. | ||
| - CORS now only enabled when `dataverse.cors.origin` is set (removed `:AllowCors` no longer enables it). | ||
| - All comma-separated configuration settings (database properties and MicroProfile config) now ignore spaces around commas; tokens remain unchanged (no quote parsing). Examples: `dataverse.cors.methods`, `dataverse.cors.headers.allow`, `dataverse.cors.headers.expose`. See "Comma-separated configuration values" in the Installation Guide. | ||
| - Docs updated (Installation, Big Data Support, External Tools, File Previews); new tests cover edge cases. | ||
|
|
||
| ## Admin Action | ||
|
|
||
| Set `dataverse.cors.origin` explicitly (required). Use explicit origins (not `*`) for credentialed requests. Ensure proxies keep `Vary: Origin`. | ||
|
|
||
| Examples: | ||
|
|
||
| ``` | ||
| dataverse.cors.origin=https://example.org | ||
| dataverse.cors.origin=https://libis.github.io,https://gdcc.github.io | ||
| dataverse.cors.origin=* | ||
| ``` | ||
|
|
||
| Optional (unquoted): | ||
|
|
||
| ``` | ||
| dataverse.cors.methods=GET, POST, OPTIONS, PUT, DELETE | ||
| ``` | ||
|
|
||
| ## Compatibility | ||
|
|
||
| - Must configure `dataverse.cors.origin`; `:AllowCors` was deprecated and has now been removed. | ||
| - Any `*` triggers wildcard (no per-origin echo / no Vary header). | ||
|
|
||
| ## Docs | ||
|
|
||
| See updated `dataverse.cors.origin` section and related notes in Big Data Support (S3), External Tools, and File Previews. | ||
|
|
||
| <!-- Maintainer note: The generic behavior for comma-separated settings has been documented centrally under Installation Guide > Configuration > "Comma-separated configuration values". Keep this item here as a cross-reference. --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.