@echoteam/signoz-react 1.0.7-beta.0 → 1.0.7

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/dist/index.js CHANGED
@@ -15301,14 +15301,19 @@ function validateConfig(config) {
15301
15301
  }
15302
15302
  // Fungsi untuk mengkonversi string allowed origins ke array
15303
15303
  function parseAllowedOrigins(originsStr) {
15304
+ // Jika tidak ada origins yang diset, izinkan semua URL
15304
15305
  if (!originsStr)
15305
- return [/.+/g];
15306
+ return ['*'];
15306
15307
  return originsStr.split(',').map(origin => {
15307
15308
  origin = origin.trim();
15308
15309
  // Jika string dimulai dan diakhiri dengan '/', anggap sebagai RegExp
15309
15310
  if (origin.startsWith('/') && origin.endsWith('/')) {
15310
15311
  return new RegExp(origin.slice(1, -1));
15311
15312
  }
15313
+ // Jika origin adalah '*', itu berarti allow all
15314
+ if (origin === '*') {
15315
+ return '.*';
15316
+ }
15312
15317
  return origin;
15313
15318
  });
15314
15319
  }