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

502 bad gateway when deploying to AWS, works locally. #3300

Closed
AliZarrouk opened this issue May 4, 2020 · 2 comments
Closed

502 bad gateway when deploying to AWS, works locally. #3300

AliZarrouk opened this issue May 4, 2020 · 2 comments
Labels
Milestone

Comments

@AliZarrouk
Copy link

Im using 2.9.2 version of the springfox-swagger-ui and springfox-swagger2.

I added a dist of swagger to do some customisation, replaced the petstore parts with window.location.origin + "/v2/api-docs" in a variable in the JS files (not the map files). It works fine locally but when deployed on AWS I have this unable to infer base url error.

Anyone knows what the issue is about ?

Screenshot 2020-05-04 at 17 46 46

@AliZarrouk
Copy link
Author

I know have the base URL set with
var swaggerUrl = window.location.origin + "/v2/api-docs" const ui = SwaggerUIBundle({ url: swaggerUrl,
Same in other js files with things like
var swaggerUrl = window.location.origin + "/v2/api-docs"; return Object(r.parseYamlConfig)('---\nurl: "' + swaggerUrl +' and now I have a 502 when trying to browse the swagger-ui.html.

Any help ?

@AliZarrouk AliZarrouk changed the title Unable to infer base url error when deploying to AWS, works locally. 502 bad gateway when deploying to AWS, works locally. May 11, 2020
@dilipkrish dilipkrish added this to the 3.0 milestone Jul 13, 2020
@dilipkrish
Copy link
Member

@AliZarrouk This should be fixed in the upcoming 3.0.0 snapshot. Note the change in location for the /swagger-ui.html. it will now be available @ /swagger-ui/[index.html] (optional index.html)

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

No branches or pull requests

2 participants