Fixed syntax error on TLS section on Advanced -> Server (#1063)

This commit is contained in:
Leonardo 2025-02-25 13:55:23 -08:00 committed by GitHub
parent 822e65cb07
commit 207ddd0e1b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 6 additions and 6 deletions

View File

@ -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))
)
```
@ -223,4 +223,4 @@ extension Application.Servers.Provider {
}
app.servers.use(.myServer)
```
```

View File

@ -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))
)
```

View File

@ -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))
)
```

View File

@ -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))
)
```

View File

@ -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))
)
```