Enable HTTPS

Generate Self Signed Certs

openssl req -new -x509 -nodes -out dev.crt -keyout dev.key
config :prometheus_sidecar,
  https: [
    keyfile: "/dev.key",
    certfile: "/dev.crt"
  ]

Or you can point to the dev.key and dev.key file that ship with Prometheus Sidecar

 config :prometheus_sidecar,
  https: [
    keyfile: "deps/prometheus_sidecar/priv/dev.key",
    certfile: "deps/prometheus_sidecar/priv/dev.crt"
  ]

Note: that these certs are self signed certs for demo purposes only.

Anything passed into the :https option will be merged into ranch's socket_opts

See all SSL ranch configurations