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

Support https connections #37

Closed
brucehvn opened this issue May 9, 2017 · 2 comments
Closed

Support https connections #37

brucehvn opened this issue May 9, 2017 · 2 comments

Comments

@brucehvn
Copy link

brucehvn commented May 9, 2017

I was trying to use microcule to run a google assistant example that was designed to run on GCF. However, the API.AI webhooks require an https connection. Looks like microcule is hard coded to start only http servers. Could it be enhanced to have the option of using the https module for starting the server?

This link documents the API.AI webhook requirements.

@Marak
Copy link
Collaborator

Marak commented May 9, 2017

microcule is a collection of HTTP middlewares, so it should be trivial to use it inside an HTTPS server.

The hard-coded part you see is for the microcule binary which is shipped for connivence. This should be easy to update to add HTTPS option.

Marak added a commit that referenced this issue Aug 23, 2017
  * Adds documentation for `microcule` binary
  * Includes demo self-signed SSL certificates
@Marak
Copy link
Collaborator

Marak commented Sep 19, 2017

I added some documentation about adding SSL keys.

It seems it was already supported through configuration options to the http package we are using.

https://github.com/stackvana/microcule#ssl

Should be as simple as adjusting configuration as following:

{
  http: {
    https: true, // enables https / ssl, requires key, cert, ca
    key: "ssl key as string",
    cert: "ssl cert as string",
    ca: "ssl ca as string",
    sslRequired: false, // redirects all http traffic to https, optional
    onlySSL: false // will only start https server with no unprotected http interface, optional
  }
}

@Marak Marak closed this as completed Sep 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants