authscape 1.0.672 → 1.0.674

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/index.js CHANGED
@@ -9192,7 +9192,7 @@ function PrivateLabelPageModule(_x, _x2) {
9192
9192
  }
9193
9193
  function _PrivateLabelPageModule() {
9194
9194
  _PrivateLabelPageModule = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(apiUri, host) {
9195
- var data, response, dataResponse, hasWWW;
9195
+ var data, response, dataResponse;
9196
9196
  return _regeneratorRuntime().wrap(function _callee$(_context) {
9197
9197
  while (1) switch (_context.prev = _context.next) {
9198
9198
  case 0:
@@ -9230,14 +9230,11 @@ function _PrivateLabelPageModule() {
9230
9230
 
9231
9231
  // check for redirect
9232
9232
  if (dataResponse.redirectTrafficToCanonical) {
9233
- hasWWW = host.startsWith('www.');
9234
- if (hasWWW) {
9235
- data.redirect = {
9236
- destination: dataResponse.canonicalBaseUrl,
9237
- // Replace with your target URL
9238
- permanent: false // Set to true for a permanent redirect (HTTP 308)
9239
- };
9240
- }
9233
+ data.redirect = {
9234
+ destination: dataResponse.canonicalBaseUrl,
9235
+ // Replace with your target URL
9236
+ permanent: false // Set to true for a permanent redirect (HTTP 308)
9237
+ };
9241
9238
  }
9242
9239
  }
9243
9240
  case 10:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "authscape",
3
- "version": "1.0.672",
3
+ "version": "1.0.674",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -41,12 +41,9 @@ export async function PrivateLabelPageModule(apiUri, host) {
41
41
  // check for redirect
42
42
  if (dataResponse.redirectTrafficToCanonical)
43
43
  {
44
- const hasWWW = host.startsWith('www.');
45
- if (hasWWW) {
46
- data.redirect = {
47
- destination: dataResponse.canonicalBaseUrl, // Replace with your target URL
48
- permanent: false, // Set to true for a permanent redirect (HTTP 308)
49
- }
44
+ data.redirect = {
45
+ destination: dataResponse.canonicalBaseUrl, // Replace with your target URL
46
+ permanent: false, // Set to true for a permanent redirect (HTTP 308)
50
47
  }
51
48
  }
52
49
  }