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

How to use HTTPS ? #1157

Closed
rudyces opened this issue Feb 17, 2020 · 3 comments
Closed

How to use HTTPS ? #1157

rudyces opened this issue Feb 17, 2020 · 3 comments
Labels

Comments

@rudyces
Copy link

rudyces commented Feb 17, 2020

Description

I made a connexion API and i do not succeed to go from HTTP to HTTPS
Is it even possible ? I don't see any exemples on it.

Here is the entrypoint of my API:

def main():
    flask_app = connexion.FlaskApp(
        __name__,
        port=9090,
        specification_dir='test/')

    flask_app.add_api(TEST_FILE)

    if flask_app.app.config['ENV'] == 'prod':
        serve(flask_app, port=9090)
    else:
        flask_app.run()

If i can add ssl_context=context (like in flask) somewhere it will be perfect but I cannot see where to put it.

Do I need to edit my schemes in my swagger files too ?

Thank you for your help.

@dtkav dtkav changed the title How tu use HTTPS ? How to use HTTPS ? Feb 17, 2020
@dtkav
Copy link
Collaborator

dtkav commented Feb 17, 2020

Hey @rudyces - I recommend terminating SSL using a reverse proxy like nginx or caddy.

@dtkav dtkav added the question label Feb 17, 2020
@rudyces
Copy link
Author

rudyces commented Feb 18, 2020

Thanks @dtkav, so there is absolutely no way to give an argument like ssl_context as an argument somewhere ?

@rudyces
Copy link
Author

rudyces commented Feb 21, 2020

I setted up a gunicorn server to launch the app using SSL at the end.

@rudyces rudyces closed this as completed Feb 21, 2020
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