mirror of https://github.com/vapor/docs.git
Update TLS example in Docs (#1013)
The enable TLS example didn't work for me locally. I eventually figured out that `NIOSSLPrivateKeySource` was required.
This commit is contained in:
parent
512138578a
commit
399b55f27f
|
|
@ -141,7 +141,7 @@ The `tlsConfiguration` parameter controls whether TLS (SSL) is enabled on the se
|
|||
// Enable TLS.
|
||||
app.http.server.configuration.tlsConfiguration = .makeServerConfiguration(
|
||||
certificateChain: try NIOSSLCertificate.fromPEMFile("/path/to/cert.pem").map { .certificate($0) },
|
||||
privateKey: .file("/path/to/key.pem")
|
||||
privateKey: try NIOSSLPrivateKey(file: "/path/to/key.pem", format: .pem))
|
||||
)
|
||||
```
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue