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: Add CORS support #983

Merged
merged 1 commit into from
Oct 21, 2021
Merged

Conversation

lenny-goodell
Copy link
Member

@lenny-goodell lenny-goodell commented Oct 21, 2021

Added CORS support enabled in go-mod-bootstrap

closes #982

Signed-off-by: Leonard Goodell leonard.goodell@intel.com

If your build fails due to your commit message not passing the build checks, please review the guidelines here: https://github.com/edgexfoundry/app-functions-sdk-go/blob/main/.github/CONTRIBUTING.md

PR Checklist

Please check if your PR fulfills the following requirements:

  • I am not introducing a breaking change (if you are, flag in conventional commit message with BREAKING CHANGE: describing the break)
  • I am not introducing a new dependency (add notes below if you are)
  • I have added unit tests for the new feature or bug fix (if not, why?) Not unit testable
  • I have fully tested (add details below) this the new feature or bug fix (if not, why?)
  • I have opened a PR for the related docs change (if not, why?)
    Will be handled by @cloudxxx8 via this issue Create document to instruct the CORS settings edgex-docs#608

Testing Instructions

  1. Clone the branch for this PR
  2. Clone the branch for ASC PR (feat: Add CORS capability app-service-configurable#342)
  3. Build ASC
  4. Run ASC - ./app-service-configurable -p functional-tests -s
  5. Send GET request to localhost:59705/api/v2/ping
  6. Verify CORS headers not in response
  7. Stop ASC
  8. Modify ./res/functional-tests/configuration.toml to enable CORS
  [Service.CORSConfiguration]
  EnableCORS = true
  1. rerun ASC - ./app-service-configurable -p functional-tests -s
  2. Send GET request to localhost:59705/api/v2/ping
  3. Verify CORS headers are now in the response

New Dependency Instructions (If applicable)

N/A

Added CORS support enabled in go-mod-bootstrap

closes edgexfoundry#982

Signed-off-by: Leonard Goodell <leonard.goodell@intel.com>
Copy link
Contributor

@jim-wang-intel jim-wang-intel left a comment

Choose a reason for hiding this comment

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

LGTM

@lenny-goodell lenny-goodell merged commit 2f5b3cf into edgexfoundry:main Oct 21, 2021
@lenny-goodell lenny-goodell deleted the cors branch October 21, 2021 23:07
FelixTing pushed a commit to FelixTing/app-functions-sdk-go that referenced this pull request Mar 3, 2022
Added CORS support enabled in go-mod-bootstrap

closes edgexfoundry#982

Signed-off-by: Leonard Goodell <leonard.goodell@intel.com>
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.

[SDK] Enable use of CORS in SDK WebServer
3 participants