Skip to content

Commit

Permalink
certs
Browse files Browse the repository at this point in the history
  • Loading branch information
xdzqyyds committed Dec 10, 2024
1 parent 6e2059d commit ae420a0
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 2 deletions.
23 changes: 23 additions & 0 deletions certs/server.crt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
-----BEGIN CERTIFICATE-----
MIIDzzCCAregAwIBAgIUYV+M7I18m9QQwgYOZUgUwcVU5ZowDQYJKoZIhvcNAQEL
BQAwdzELMAkGA1UEBhMCQ04xEDAOBgNVBAgMB1NoYWFueGkxDTALBgNVBAcMBFhp
YW4xCzAJBgNVBAoMAlhEMQswCQYDVQQLDAJYRDELMAkGA1UEAwwCWEQxIDAeBgkq
hkiG9w0BCQEWETIyOTIxMzY1NDVAcXEuY29tMB4XDTI0MTIxMDA2MDcwOVoXDTM0
MTIwODA2MDcwOVowdzELMAkGA1UEBhMCQ04xEDAOBgNVBAgMB1NoYWFueGkxDTAL
BgNVBAcMBFhpYW4xCzAJBgNVBAoMAlhEMQswCQYDVQQLDAJYRDELMAkGA1UEAwwC
WEQxIDAeBgkqhkiG9w0BCQEWETIyOTIxMzY1NDVAcXEuY29tMIIBIjANBgkqhkiG
9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuKnS0Zn6GfksxnIzasS3c5ZKbPpkI6nxPLSf
RM3+VHZ4nGQ8mkPht5PydMBldRt8ZCpu7iot6kKDxTl8TI/1+kEYwZBR/6gjRaDq
yGIvUSJ3Oj4whWFvBOfX8DPb1UHI5flqmKDyAOHcDB3b2eV46guNSuPlapscHOF8
uRaod8vza4fnrGbIPwJv06NvhbuzUVPPux6wvaZlxb8uLo/AdIYmvCBUrNUvrIYp
YGBy6Ap27ehd12uy8z6HuInJjtEyKSzhx1vRZrXIIhvqlQHpkpatjbErY6p0vU5R
GeqhogYrv1ps2NPok8OG28qBWcShBrkjZaPhQFZVR2p4KXPFHQIDAQABo1MwUTAd
BgNVHQ4EFgQU7yN4hsNSPfJ8BfgJG2jDR6nCSJYwHwYDVR0jBBgwFoAU7yN4hsNS
PfJ8BfgJG2jDR6nCSJYwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOC
AQEAa8ERes+2LNNYf3zzt0hNO6h/oDA6DQBgODCkvjznTbZv5/CWCrd8HDkq4/Pp
w8P1qyAFsSy5Kmi7AGM1O/EPS/Mdq1inoY+aFmcPFeNmBgXcq6nO0Q6dpCQbDmj+
xhOhnHuSc9klVwRiXmG4cBcpDr6lukgUVaRR9qfJoX0JXwrB+ecV96K1cUBK6iTI
XtBByfuei6/Nuzb7AJ3ykzQkgpBJuNAFvf8AHPTqMmHjJPj9OAJUXdBclad2u668
Sa5tpCTBTDaaPccfJTCBEeClSmqq4zI4fSb79nd+eYHLF7SRMt5lDi7xOrTuFti1
5VO8W8xnAhbpaapFlFVEOkItqQ==
-----END CERTIFICATE-----
28 changes: 28 additions & 0 deletions certs/server.key
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
-----BEGIN PRIVATE KEY-----
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC4qdLRmfoZ+SzG
cjNqxLdzlkps+mQjqfE8tJ9Ezf5UdnicZDyaQ+G3k/J0wGV1G3xkKm7uKi3qQoPF
OXxMj/X6QRjBkFH/qCNFoOrIYi9RInc6PjCFYW8E59fwM9vVQcjl+WqYoPIA4dwM
HdvZ5XjqC41K4+Vqmxwc4Xy5Fqh3y/Nrh+esZsg/Am/To2+Fu7NRU8+7HrC9pmXF
vy4uj8B0hia8IFSs1S+shilgYHLoCnbt6F3Xa7LzPoe4icmO0TIpLOHHW9Fmtcgi
G+qVAemSlq2NsStjqnS9TlEZ6qGiBiu/WmzY0+iTw4bbyoFZxKEGuSNlo+FAVlVH
angpc8UdAgMBAAECggEACbRC8+jXj83cYIFX2mCEE3ruZlOyN32Sw9HqHL+GggHH
zNAnryOqFO+dai1CJ6lOHCVutu1YhFsCebbPpWZbUs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/P
JV+oCkzrxk9mlfMSTUtmShMk3lbq8l7qv74e+urORyoagkhL3oujxzt4ZV78+3Pb
/JoySJnIOoXj5T1wutsUWfFN
-----END PRIVATE KEY-----
2 changes: 2 additions & 0 deletions server/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ type Config struct {
RedisUrl string `env:"REDIS_URL" envDefault:"redis://localhost:6379/0"`
Live777Url string `env:"LIVE777_URL" envDefault:"http://localhost:7777"`
Live777Token string `env:"LIVE777_TOKEN" envDefault:""`
CertFile string `env:"CERT_FILE" envDefault:"certs/server.crt"`
KeyFile string `env:"KEY_FILE" envDefault:"certs/server.key"`
}
2 changes: 2 additions & 0 deletions server/daemon/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,6 @@ func Daemon(ctx context.Context) {

log.Println("=== started ===")
log.Panicln(http.ListenAndServe(":"+cfg.Port, handler))
//log.Println("=== HTTPS server started ===")
//log.Panicln(http.ListenAndServeTLS(":"+cfg.Port, cfg.CertFile, cfg.KeyFile, handler))
}
3 changes: 1 addition & 2 deletions webapp/lib/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ function sendInvite(meetingId: string, inviterId: string, inviteeId: string): Pr
}),
})
.then(() => {
// 处理成功后不做任何事,或者可以在此添加日志等
})
.catch((error) => {
console.error('Error sending invite:', error)
Expand All @@ -188,7 +187,7 @@ async function getInvitation(inviteeId: string): Promise<InvitationResponse | nu
})

const result = await response.json()
// 如果 value 为 null,说明没有邀请

if (!result.value) {
return null
}
Expand Down

0 comments on commit ae420a0

Please sign in to comment.