-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIX: Corrected CORS content-type header (#46)
## Description FIX: Corrected CORS configuration to include `Content-Type` header by default. REFACTOR: Rename `Page.Results` to `Page.Items` for better description. ## Related Issue ## Motivation and Context - When accessing the API from some webapps, it occurs the problem of CORS being rejected because `Content-Type` is not included by default in the API's CORS configuration. And since it's so easy for this to become a requirement in almost any webapp, then it's better to include it by default. - The `Page` class contains a list of items being paged called `Results`. This sometimes generates confusion and it's a better description if it would be renamed to `Items` (`Page.Items`) ## How Has This Been Tested? Unit tests updated accordingly for the `Page.Items` change. Manual testing for the CORS configuration. ## Screenshots (if appropriate): ## Types of changes - [X] Bug fix (non-breaking change which fixes an issue) - [X] Refactor - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) ## Checklist: - [X] My code follows the code style of this project. - [ ] My change requires a change to the documentation. - [ ] I have updated the documentation accordingly. - [X] I have read the **CONTRIBUTING** document. - [X] I have added tests to cover my changes. - [X] All new and existing tests passed.
- Loading branch information
Showing
6 changed files
with
27 additions
and
30 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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