Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

[cetic/swaggerui] Cannot access "Try it now" features unless ingress path is "/" #10

Open
ghost opened this issue Jan 15, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@ghost
Copy link

ghost commented Jan 15, 2021

Describe the bug

  • The "Try it Now" features only work if the ingress endpoint is left as the default / value. If you modify it and enable nginx-ingress re-writes, the web app can load, but the "Try It Now" functionality will not work.

Version of Helm and Kubernetes:

helm version
version.BuildInfo{Version:"v3.0.3", GitCommit:"ac925eb7279f4a6955df663a0128044a8a6b7593", GitTreeState:"clean", GoVersion:"go1.13.6"}

Client Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.1", GitCommit:"c4d752765b3bbac2237bf87cf0b1c2e307844666", GitTreeState:"clean", BuildDate:"2020-12-18T12:09:25Z", GoVersion:"go1.15.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.4", GitCommit:"8d8aa39598534325ad77120c120a22b3a990b5ea", GitTreeState:"clean", BuildDate:"2020-03-12T20:55:23Z", GoVersion:"go1.13.8", Compiler:"gc", Platform:"linux/amd64"}

What happened:

The "Try It Now" functionality strips out the re-written portion of the URL, and reports a "Network Error" when attempting to do live testing/debugging against a running OpenAPI-enabled service.

What you expected to happen:

For the "Try It Now" functionality to not discard intermediate/re-written portions of the URL (perhaps additional ingress configuration options, such as X-Forwarded-For also need to be enabled, but I'm not certain of how the underlying app would make use of such settings (if it does at all).

How to reproduce it (as minimally and precisely as possible):

Please see: swagger-api/swagger-ui#6838

The entire example has been left there (for visibility by the app owners).

Anything else we need to know:

There is a workaround, but it involves supplying the FQDN and full endpoint path at chart install time. This is not a typical/viable workflow.

@SellamiRami SellamiRami added the enhancement New feature or request label Jan 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant