mockaton 8.3.3 → 8.3.4

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/README.md CHANGED
@@ -13,10 +13,13 @@ URL paths. For example, the following file will be served on `/api/user/1234`
13
13
  my-mocks-dir/api/user/[user-id].GET.200.json
14
14
  ```
15
15
 
16
- By the way, you don’t need to mock all your APIs. Mockaton can request
17
- from your backend the routes you don’t have mocks for. That’s done
18
- with `config.proxyFallback = 'http://mybackend'`. For convenience, you
19
- can save mocks for those responses with `config.collectProxied = true`
16
+ ## Scraping Mocks
17
+ You don’t need to mock all your APIs. Mockaton can request
18
+ from your backend the routes you don’t have mocks for. That’s done with:
19
+
20
+ `config.proxyFallback = 'http://mybackend'`
21
+
22
+ `config.collectProxied = true` lets you save those responses as mocks following the filename convention.
20
23
 
21
24
  ## Multiple Mock Variants
22
25
  Each route can have many mocks, which could either be:
@@ -420,7 +423,7 @@ function capitalizePlugin(filePath) {
420
423
 
421
424
 
422
425
  ### `corsAllowed?: boolean`
423
- Defaults to `corsAllowed = false`. When `config.corsAllowed === true`, these are the default options:
426
+ Defaults to `true`. When `true`, these are the default options:
424
427
  ```js
425
428
  config.corsOrigins = ['*']
426
429
  config.corsMethods = ['GET', 'PUT', 'DELETE', 'POST', 'PATCH', 'HEAD', 'OPTIONS', 'TRACE', 'CONNECT']
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "mockaton",
3
3
  "description": "A deterministic server-side for developing and testing frontend clients",
4
4
  "type": "module",
5
- "version": "8.3.3",
5
+ "version": "8.3.4",
6
6
  "main": "index.js",
7
7
  "types": "index.d.ts",
8
8
  "license": "MIT",
package/src/config.js CHANGED
@@ -24,7 +24,7 @@ export const config = Object.seal({
24
24
  [/\.(js|ts)$/, jsToJsonPlugin]
25
25
  ],
26
26
 
27
- corsAllowed: false,
27
+ corsAllowed: true,
28
28
  corsOrigins: ['*'],
29
29
  corsMethods: StandardMethods,
30
30
  corsHeaders: ['content-type'],