Skip to content

Changing inferred url #3468

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

Closed
prafful13 opened this issue Aug 1, 2020 · 8 comments
Closed

Changing inferred url #3468

prafful13 opened this issue Aug 1, 2020 · 8 comments

Comments

@prafful13
Copy link

prafful13 commented Aug 1, 2020

  • [X ] What version of the library are you using? Is it the latest version? The latest released version is Download
    Latest - 3.0.0
    What kind of issue is this?

  • [ X] Question. Is this a question about how to do a certain thing?
    So I am trying to change the inferred url to use https as my service is served over https protocal. However currently it is using http and thus giving a

Code Details
Undocumented TypeError: Failed to fetch

error whenever trying out a api call from swagger ui.
Can someone help with how to get around it and make the APIs being called via https instead of http?

@dilipkrish
Copy link
Member

Thats weird if its inferring http when you've deployed it over https. Could you describe how this is setup?

Possible duplicate of #3104

@dilipkrish dilipkrish added this to the 3.0.1 milestone Aug 3, 2020
@iboich
Copy link

iboich commented Aug 4, 2020

The same issue for me when requesting from swagger-ui client.
image
image

        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-boot-starter</artifactId>
            <version>3.0.0</version>
        </dependency>

Server with spring is deployed with HTTP protocol but is accessed via the proxy with HTTPS. So, I supposed need to take into account such fact, when generating servers URL protocol.
With direct HTTP access swagger-ui HTTP client works fine.

@minhnguyenvan95
Copy link

up

@dilipkrish
Copy link
Member

You're not using the x-forward headers in the API gateway, which is why you're seeing this issue.

@minhnguyenvan95
Copy link

You're not using the x-forward headers in the API gateway, which is why you're seeing this issue.

Could you please tell me which x-forward should I use ?

@dilipkrish
Copy link
Member

The X-Forward-Proto would be my guess

@stale
Copy link

stale bot commented Dec 3, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Dec 3, 2020
@stale
Copy link

stale bot commented Dec 17, 2020

This issue has been automatically closed because it has not had recent activity. Please re-open a new issue if this is still an issue.

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

No branches or pull requests

4 participants