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

Update OpenApiRecorder to recommend using quarkus.http.cors #24186

Merged
merged 1 commit into from Mar 9, 2022

Conversation

sberyozkin
Copy link
Member

This PR adds a log info message to OpenApiRecorder to recommend using quarkus.http.cors in the production mode and update the docs with a link to HTTP CORS section

@gsmet
Copy link
Member

gsmet commented Mar 8, 2022

Cancelling build.

@sberyozkin
Copy link
Member Author

It is OK, did not know it was overloaded

Copy link
Member

@phillip-kruger phillip-kruger left a comment

Choose a reason for hiding this comment

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

LGTM

@gsmet gsmet merged commit 18b4520 into quarkusio:main Mar 9, 2022
@quarkus-bot quarkus-bot bot added this to the 2.8 - main milestone Mar 9, 2022
@gsmet gsmet modified the milestones: 2.8 - main, 2.7.4.Final Mar 9, 2022
@sberyozkin sberyozkin deleted the openapi_cors branch March 9, 2022 10:21
@famod
Copy link
Member

famod commented Apr 5, 2022

I'm currently migrating my app to 2.8.0.Final and I'm seeing this log message.

It's only INFO, but in my case I find it more confusing than helpful (or I'm missing something):

  • yes we have a SPA
  • we have a reverse proxy in between the SPA and the Quarkus app
  • the SPA is not pulling the openapi-document (instead, it generated code from it during build time)

Why should I enable CORS in this case?
It seems I have to bump the logger to WARN to get rid of this message?

Thanks!

@gsmet
Copy link
Member

gsmet commented Apr 5, 2022

@sberyozkin is this message actually solving something? I mean did we have complaints? Using CORS and setting it up is very common these days so I'm not sure we are actually solving a problem. And if not, it makes no sense to pollute things for people who don't need CORS enabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants