@alicloud/alfa-core 1.5.0-alpha.4 → 1.5.0-alpha.5

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.
@@ -21,10 +21,13 @@ function _requestInterceptor() {
21
21
  return _regeneratorRuntime.wrap(function _callee$(_context) {
22
22
  while (1) switch (_context.prev = _context.next) {
23
23
  case 0:
24
- hostname = getCurrentCdnHost(); // if cdn is not alicdn, replace it
25
- if (hostname && config.url) {
26
- // 非公有云下无 cws2
27
- config.url = config.url.replace(new RegExp('.alicdn.com'), ".".concat(hostname)).replace('cws2.', 'cws.');
24
+ hostname = getCurrentCdnHost();
25
+ if (hostname !== 'alicdn.com') {
26
+ // if cdn is not alicdn, replace it
27
+ if (hostname && config.url) {
28
+ // 非公有云下无 cws2
29
+ config.url = config.url.replace(new RegExp('.alicdn.com'), ".".concat(hostname)).replace('cws2.', 'cws.');
30
+ }
28
31
  }
29
32
  return _context.abrupt("return", config);
30
33
  case 3:
@@ -28,10 +28,13 @@ function _requestInterceptor() {
28
28
  return _regenerator.default.wrap(function _callee$(_context) {
29
29
  while (1) switch (_context.prev = _context.next) {
30
30
  case 0:
31
- hostname = getCurrentCdnHost(); // if cdn is not alicdn, replace it
32
- if (hostname && config.url) {
33
- // 非公有云下无 cws2
34
- config.url = config.url.replace(new RegExp('.alicdn.com'), ".".concat(hostname)).replace('cws2.', 'cws.');
31
+ hostname = getCurrentCdnHost();
32
+ if (hostname !== 'alicdn.com') {
33
+ // if cdn is not alicdn, replace it
34
+ if (hostname && config.url) {
35
+ // 非公有云下无 cws2
36
+ config.url = config.url.replace(new RegExp('.alicdn.com'), ".".concat(hostname)).replace('cws2.', 'cws.');
37
+ }
35
38
  }
36
39
  return _context.abrupt("return", config);
37
40
  case 3:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alicloud/alfa-core",
3
- "version": "1.5.0-alpha.4",
3
+ "version": "1.5.0-alpha.5",
4
4
  "description": "MicroFront End SDK for alicloud",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",