@cocreate/acme 1.1.0 → 1.1.1

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,10 @@
1
+ ## [1.1.1](https://github.com/CoCreate-app/CoCreate-acme/compare/v1.1.0...v1.1.1) (2024-01-01)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * check pathname for acme-challenge and return true ([0b90df5](https://github.com/CoCreate-app/CoCreate-acme/commit/0b90df504cb452bc60a822ea55c0987c71e3fa11))
7
+
1
8
  # [1.1.0](https://github.com/CoCreate-app/CoCreate-acme/compare/v1.0.0...v1.1.0) (2023-12-31)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/acme",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "An intergration with ACME and CoCreateJS.",
5
5
  "keywords": [
6
6
  "acme",
package/src/index.js CHANGED
@@ -232,9 +232,9 @@ class CoCreateAcme {
232
232
  return await this.requestCertificate(host, organization_id, false)
233
233
  }
234
234
 
235
- async checkCertificate(host, organization_id) {
235
+ async checkCertificate(host, organization_id, pathname = '') {
236
236
  let hostname = host.split(':')[0]
237
- if (hostname === 'localhost' || hostname === '127.0.0.1')
237
+ if (hostname === 'localhost' || hostname === '127.0.0.1' || pathname.startsWith('/.well-known/acme-challenge/'))
238
238
  return true
239
239
 
240
240
  let expires = certificates.get(host)