@cloudcare/browser-core 1.0.18 → 1.0.19
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/cjs/configuration.js +19 -1
- package/esm/configuration.js +17 -1
- package/package.json +2 -2
- package/src/configuration.js +13 -1
package/cjs/configuration.js
CHANGED
|
@@ -151,5 +151,23 @@ function mustUseSecureCookie(userConfiguration) {
|
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
function isIntakeRequest(url, configuration) {
|
|
154
|
-
return
|
|
154
|
+
// return haveSameOrigin(url, configuration.datakitUrl)
|
|
155
|
+
var notTakeRequest = [configuration.datakitUrl];
|
|
156
|
+
|
|
157
|
+
if (configuration.logsEndpoint) {
|
|
158
|
+
notTakeRequest.push(configuration.logsEndpoint);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
var isIntake = false;
|
|
162
|
+
|
|
163
|
+
for (var _i = 0, _notTakeRequest = notTakeRequest; _i < _notTakeRequest.length; _i++) {
|
|
164
|
+
var _url = _notTakeRequest[_i];
|
|
165
|
+
|
|
166
|
+
if (url.indexOf(_url) === 0) {
|
|
167
|
+
isIntake = true;
|
|
168
|
+
break;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
return isIntake;
|
|
155
173
|
}
|
package/esm/configuration.js
CHANGED
|
@@ -136,5 +136,21 @@ function mustUseSecureCookie(userConfiguration) {
|
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
export function isIntakeRequest(url, configuration) {
|
|
139
|
-
return haveSameOrigin(url, configuration.datakitUrl)
|
|
139
|
+
// return haveSameOrigin(url, configuration.datakitUrl)
|
|
140
|
+
var notTakeRequest = [configuration.datakitUrl];
|
|
141
|
+
|
|
142
|
+
if (configuration.logsEndpoint) {
|
|
143
|
+
notTakeRequest.push(configuration.logsEndpoint);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
var isIntake = false;
|
|
147
|
+
|
|
148
|
+
for (var _url of notTakeRequest) {
|
|
149
|
+
if (url.indexOf(_url) === 0) {
|
|
150
|
+
isIntake = true;
|
|
151
|
+
break;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
return isIntake;
|
|
140
156
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcare/browser-core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.19",
|
|
4
4
|
"main": "cjs/index.js",
|
|
5
5
|
"module": "esm/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
"author": "dataflux",
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"description": "DataFlux RUM Web 端数据指标监控",
|
|
23
|
-
"gitHead": "
|
|
23
|
+
"gitHead": "642b7a18f128ce5297dcb9b73df3136418c8c53e"
|
|
24
24
|
}
|
package/src/configuration.js
CHANGED
|
@@ -132,5 +132,17 @@ function mustUseSecureCookie(userConfiguration) {
|
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
export function isIntakeRequest(url, configuration) {
|
|
135
|
-
return haveSameOrigin(url, configuration.datakitUrl)
|
|
135
|
+
// return haveSameOrigin(url, configuration.datakitUrl)
|
|
136
|
+
var notTakeRequest = [configuration.datakitUrl]
|
|
137
|
+
if (configuration.logsEndpoint) {
|
|
138
|
+
notTakeRequest.push(configuration.logsEndpoint)
|
|
139
|
+
}
|
|
140
|
+
var isIntake = false
|
|
141
|
+
for(var _url of notTakeRequest) {
|
|
142
|
+
if (url.indexOf(_url) === 0) {
|
|
143
|
+
isIntake = true
|
|
144
|
+
break;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
return isIntake
|
|
136
148
|
}
|