mirror of https://github.com/vapor/docs.git
Fixed syntax error on TLS section on Advanced -> Server (#1063)
This commit is contained in:
parent
822e65cb07
commit
207ddd0e1b
|
|
@ -132,7 +132,7 @@ Der Parameter _tlsConfiguration_ legt fest, ob TLS (SSL) verwendet werden soll.
|
|||
// Enable TLS.
|
||||
app.http.server.configuration.tlsConfiguration = .makeServerConfiguration(
|
||||
certificateChain: try NIOSSLCertificate.fromPEMFile("/path/to/cert.pem").map { .certificate($0) },
|
||||
privateKey: try NIOSSLPrivateKey(file: "/path/to/key.pem", format: .pem))
|
||||
privateKey: .privateKey(try NIOSSLPrivateKey(file: "/path/to/key.pem", format: .pem))
|
||||
)
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ El parámetro `tlsConfiguration` controla si TLS (SSL) está habilitado en el se
|
|||
// Habilitar TLS.
|
||||
app.http.server.configuration.tlsConfiguration = .makeServerConfiguration(
|
||||
certificateChain: try NIOSSLCertificate.fromPEMFile("/path/to/cert.pem").map { .certificate($0) },
|
||||
privateKey: try NIOSSLPrivateKey(file: "/path/to/key.pem", format: .pem))
|
||||
privateKey: .privateKey(try NIOSSLPrivateKey(file: "/path/to/key.pem", format: .pem))
|
||||
)
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -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: try NIOSSLPrivateKey(file: "/path/to/key.pem", format: .pem))
|
||||
privateKey: .privateKey(try NIOSSLPrivateKey(file: "/path/to/key.pem", format: .pem))
|
||||
)
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ De `tlsConfiguration` parameter regelt of TLS (SSL) is ingeschakeld op de server
|
|||
// Schakel TLS in.
|
||||
app.http.server.configuration.tlsConfiguration = .makeServerConfiguration(
|
||||
certificateChain: try NIOSSLCertificate.fromPEMFile("/path/to/cert.pem").map { .certificate($0) },
|
||||
privateKey: try NIOSSLPrivateKey(file: "/path/to/key.pem", format: .pem))
|
||||
privateKey: .privateKey(try NIOSSLPrivateKey(file: "/path/to/key.pem", format: .pem))
|
||||
)
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ app.http.server.configuration.supportVersions = [.two]
|
|||
// 启用 TLS.
|
||||
app.http.server.configuration.tlsConfiguration = .makeServerConfiguration(
|
||||
certificateChain: try NIOSSLCertificate.fromPEMFile("/path/to/cert.pem").map { .certificate($0) },
|
||||
privateKey: try NIOSSLPrivateKey(file: "/path/to/key.pem", format: .pem))
|
||||
privateKey: .privateKey(try NIOSSLPrivateKey(file: "/path/to/key.pem", format: .pem))
|
||||
)
|
||||
```
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue