scottie1984 / swagger-ui-express

Adds middleware to your express app to serve the Swagger UI bound to your Swagger document. This acts as living documentation for your API hosted from within your app.
MIT License
1.42k stars 225 forks source link

Issue when deploying to AWS Beanstalk - Node.js - Nginx #226

Closed zenzjtech closed 3 years ago

zenzjtech commented 3 years ago

Hello,

I'm deploying this app to Beanstalk of which the underlying EC2 instance uses Node.js v12 and Nginx.

When the app is run at my localhost, swagger docs is rendered normally as expected.

But when deploying to Beanstalk, the result is timeout The reason, as I've been inspecting until now, is that all of the accompanying resource files are loaded from https protocol, which is not available at Beanstalk server, while the source index.html is loaded from http protocol.

Note that the protocol my beanstalk is http, as you could see from the screenshot.

image

Related source code

Thank you for any helps!

weylermaldonado commented 3 years ago

Same problem, did you figure out any solution?

zenzjtech commented 3 years ago

Same problem, did you figure out any solution?

I have to temporarily porting swagger -> postman json file, and use postman web for publishing docs.

scottie1984 commented 3 years ago

I’m not sure the issue is with this module or how it can be fixed. I don’t see any references to https in the code.

I will close this for now - please feel free to reopen if you can provide further details or you can pinpoint a fix