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
micronaut:
ssl:
enabled: true
buildSelfSigned: true (1)
1 | Micronaut will create a self-signed certificate. |
| By default Micronaut with HTTPS support starts on port 8443 but you can change the port the property micronaut.ssl.port . |
| Keep in mind that this configuration will generate a warning on the browser. |