@cocreate/server 1.1.0 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [1.1.2](https://github.com/CoCreate-app/CoCreate-server/compare/v1.1.1...v1.1.2) (2024-02-05)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * Removed https://cdn.cocreate.app/latest/CoCreate.min.css ([3c43ac8](https://github.com/CoCreate-app/CoCreate-server/commit/3c43ac8338775f6914cbe3511b79ac00154dde26))
7
+
8
+ ## [1.1.1](https://github.com/CoCreate-app/CoCreate-server/compare/v1.1.0...v1.1.1) (2024-01-08)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * return if ssl false ([500e7c7](https://github.com/CoCreate-app/CoCreate-server/commit/500e7c7898f3a3a5ecc676ca68cd105cc1f29a6f))
14
+
1
15
  # [1.1.0](https://github.com/CoCreate-app/CoCreate-server/compare/v1.0.2...v1.1.0) (2024-01-08)
2
16
 
3
17
 
package/docs/index.html CHANGED
@@ -21,11 +21,6 @@
21
21
  property="og:image"
22
22
  content="https://cdn.cocreate.app/docs/server.png" />
23
23
 
24
- <!-- CoCreate CSS -->
25
- <link
26
- rel="stylesheet"
27
- href="https://cdn.cocreate.app/latest/CoCreate.min.css"
28
- type="text/css" />
29
24
  <link
30
25
  rel="stylesheet"
31
26
  href="../index.css"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/server",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "An intergration with Server and CoCreateJS.",
5
5
  "keywords": [
6
6
  "server",
package/src/index.js CHANGED
@@ -25,11 +25,10 @@ function loadCertificates(domain) {
25
25
  async function sniCallback(domain, cb) {
26
26
  try {
27
27
  console.log('sni')
28
- await server.acme.checkCertificate(domain);
29
-
30
- const sslContext = tls.createSecureContext(loadCertificates(domain));
31
- cb(null, sslContext);
32
-
28
+ if (await server.acme.checkCertificate(domain)) {
29
+ const sslContext = tls.createSecureContext(loadCertificates(domain));
30
+ cb(null, sslContext);
31
+ } else return
33
32
  } catch (error) {
34
33
  console.error("Error in SNI callback for domain:", domain, error);
35
34
  cb(error); // handle error or use default context