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

CORS @CrossOrigin annotation not working when metrics.rest-request.enabled=true is set #5094

Closed
tjquinno opened this issue Oct 5, 2022 · 0 comments
Assignees
Labels
2.x Issues for 2.x version branch bug Something isn't working cors Related to CORS support
Projects

Comments

@tjquinno
Copy link
Member

tjquinno commented Oct 5, 2022

Environment Details

  • Helidon Version: 2.x, 3.x, 4.x
  • Helidon SE or Helidon MP MP
  • JDK version:
  • OS:
  • Docker version (if applicable):

Problem Description

Enabling the optional MicroProfile REST request metrics feature causes Helidon to ignore @CrossOrigin annotations in the code.

Steps to reproduce

In the Helidon MP CORS example app, add this line to microprofile-config.properties:

metrics.rest-request.enabled=true

Now try to run the curl commands in the app's README.md which trigger CORS behavior, and you'll get 500 status messages instead of success and the log will report that Helidon could not locate the expected CORS information.

Workaround

Add CORS configuration settings to microprofile-config.properties to achieve the result you wanted to achieve using the annotations. See https://helidon.io/docs/latest/index.html#/mp/cors/cors#_configuration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.x Issues for 2.x version branch bug Something isn't working cors Related to CORS support
Projects
Archived in project
Backlog
  
Closed
Development

No branches or pull requests

1 participant