unconventional 0.0.8 → 0.0.9

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.
Files changed (2) hide show
  1. package/dist/server.js +3 -3
  2. package/package.json +1 -1
package/dist/server.js CHANGED
@@ -34,14 +34,14 @@ class BackendServer {
34
34
  if (config.basePath)
35
35
  this._app = this._app.basePath(config.basePath);
36
36
  // Database binding
37
- this._app.use((0, utils_1.bindDatabase)(config.getDB));
37
+ this._app.use('*', (0, utils_1.bindDatabase)(config.getDB));
38
38
  // CORS
39
- this._app.use(config.cors ? (0, cors_1.cors)(config.cors) : utils_1.defaultCors);
39
+ this._app.use('*', config.cors ? (0, cors_1.cors)(config.cors) : utils_1.defaultCors);
40
40
  // Error handling
41
41
  this._app.onError(utils_1.defaultErrorHandler);
42
42
  // Standard middleware
43
43
  if (config.middleware)
44
- this._app.use(...config.middleware);
44
+ this._app.use('*', ...config.middleware);
45
45
  this.configured = true;
46
46
  return this;
47
47
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unconventional",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "description": "A complete server built on Cloudflare Pages Functions",
5
5
  "keywords": [
6
6
  "cloudflare",