6.29.4 Securing the Server with HTTPS

Micronaut supports HTTPS out of the box. By default HTTPS is disabled and all requests are served using HTTP. To enable HTTPS support, modify your configuration. For example with application.yml:

HTTPS Configuration Example

  1. micronaut:
  2. ssl:
  3. enabled: true
  4. buildSelfSigned: true (1)
1Micronaut will create a self-signed certificate.
By default Micronaut with HTTPS support starts on port 8443 but you can change the port with the property micronaut.ssl.port.
This configuration will generate a warning in the browser.

https warning