@modern-js/prod-server 1.1.6 → 1.1.8

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,5 +1,18 @@
1
1
  # @modern-js/prod-server
2
2
 
3
+ ## 1.1.8
4
+
5
+ ### Patch Changes
6
+
7
+ - a1198d509: feat: bump babel 7.18.0
8
+ - @modern-js/server-core@1.3.5
9
+
10
+ ## 1.1.7
11
+
12
+ ### Patch Changes
13
+
14
+ - d4afeba71: fix: remove cors for prod-server
15
+
3
16
  ## 1.1.6
4
17
 
5
18
  ### Patch Changes
@@ -111,13 +111,7 @@ export class ModernServer {
111
111
  distDir,
112
112
  staticGenerate,
113
113
  conf
114
- } = this; // Todo: why add this middleware
115
-
116
- this.addHandler((ctx, next) => {
117
- ctx.res.setHeader('Access-Control-Allow-Origin', '*');
118
- ctx.res.setHeader('Access-Control-Allow-Credentials', 'false');
119
- next();
120
- });
114
+ } = this;
121
115
  debug('final server conf', this.conf); // proxy handler, each proxy has own handler
122
116
 
123
117
  this.proxyHandler = createProxyHandler((_conf$bff = conf.bff) === null || _conf$bff === void 0 ? void 0 : _conf$bff.proxy);
@@ -140,13 +140,7 @@ class ModernServer {
140
140
  distDir,
141
141
  staticGenerate,
142
142
  conf
143
- } = this; // Todo: why add this middleware
144
-
145
- this.addHandler((ctx, next) => {
146
- ctx.res.setHeader('Access-Control-Allow-Origin', '*');
147
- ctx.res.setHeader('Access-Control-Allow-Credentials', 'false');
148
- next();
149
- });
143
+ } = this;
150
144
  (0, _utils2.debug)('final server conf', this.conf); // proxy handler, each proxy has own handler
151
145
 
152
146
  this.proxyHandler = (0, _proxy.createProxyHandler)((_conf$bff = conf.bff) === null || _conf$bff === void 0 ? void 0 : _conf$bff.proxy);
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "1.1.6",
14
+ "version": "1.1.8",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "types": "./dist/types/index.d.ts",
17
17
  "main": "./dist/js/node/index.js",
@@ -29,7 +29,7 @@
29
29
  },
30
30
  "dependencies": {
31
31
  "@modern-js/utils": "^1.7.6",
32
- "@babel/compat-data": "^7.17.0",
32
+ "@babel/compat-data": "^7.17.10",
33
33
  "@modern-js/server-core": "^1.3.5",
34
34
  "axios": "^0.24.0",
35
35
  "compare-versions": "^3.6.0",
@@ -44,7 +44,7 @@
44
44
  },
45
45
  "devDependencies": {
46
46
  "@modern-js/types": "1.5.4",
47
- "@modern-js/core": "1.11.1",
47
+ "@modern-js/core": "1.11.2",
48
48
  "@scripts/jest-config": "0.0.0",
49
49
  "@scripts/build": "0.0.0",
50
50
  "@types/cookie": "^0.4.1",