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

Openapi endpoint must provide CORS #1562

Closed
rafabene opened this issue Mar 23, 2020 · 1 comment
Closed

Openapi endpoint must provide CORS #1562

rafabene opened this issue Mar 23, 2020 · 1 comment
Labels
1.x Issues for 1.x version branch MP open-api P4

Comments

@rafabene
Copy link

rafabene commented Mar 23, 2020

Environment Details

  • Helidon Version: 1.4.4
  • Helidon MP
  • JDK version: N/A
  • OS: N/A
  • Docker version (if applicable):

Problem Description

A Swagger-UI running outside Helidon application can't consume /openapi as it doesn't provide CORS support.
The response at Swagger-UI is Possible cross-origin (CORS) issue? The URL origin (http://localhost:8080) does not match the page (http://localhost). Check the server returns the correct 'Access-Control-Allow-*' headers.

I've implemented a custom CORSFilter/ContainerResponseFilter but it didn't affect /openapi

A property openapi.cors=true configuration should be provided to enable/disable CORS at /openapi endpoint.

Steps to reproduce

  1. Execute Swagger-UI with docker run -p 80:8080 swaggerapi/swagger-ui
  2. Execute a Helidon-MP application with OpenAPI enabled.
  3. Open the URL http://localhost/?url=http://localhost:8080/openapi in any browser
@rafabene rafabene changed the title Openapi endpoint must provide CROS Openapi endpoint must provide CORS Mar 23, 2020
rafabene added a commit to rafabene/helidon that referenced this issue Mar 23, 2020
@tomas-langer tomas-langer added MP open-api 1.x Issues for 1.x version branch labels Mar 24, 2020
@m0mus m0mus added the P4 label Mar 26, 2020
@tjquinno tjquinno assigned tjquinno and unassigned tjquinno Apr 2, 2020
@tjquinno
Copy link
Member

tjquinno commented Sep 7, 2023

This is not an issue in 2.x or later releases and we are not planning to fix this in 1.x.

@tjquinno tjquinno closed this as completed Sep 7, 2023
@m0mus m0mus added this to Backlog Aug 12, 2024
@m0mus m0mus moved this to Closed in Backlog Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.x Issues for 1.x version branch MP open-api P4
Projects
Archived in project
Development

No branches or pull requests

4 participants