@sitecore-jss/sitecore-jss-nextjs 22.6.0-canary.35 → 22.6.0-canary.37

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.
@@ -108,7 +108,13 @@ class ServerlessEditingDataService {
108
108
  params,
109
109
  };
110
110
  sitecore_jss_1.debug.editing('storing editing data for %o: %o', previewData, data);
111
- return this.dataFetcher.put(url, data).then(() => {
111
+ return this.dataFetcher
112
+ .put(url, data, {
113
+ headers: {
114
+ 'Content-Type': 'application/json',
115
+ },
116
+ })
117
+ .then(() => {
112
118
  return previewData;
113
119
  });
114
120
  });
@@ -255,9 +255,9 @@ class RedirectsMiddleware extends middleware_1.MiddlewareBase {
255
255
  return false;
256
256
  })
257
257
  .join('&');
258
- const newUrl = new URL(`${url.pathname}?${newQueryString}`, url.origin);
258
+ const newUrl = new URL(`${url.pathname.toLowerCase()}?${newQueryString}`, url.origin);
259
259
  url.search = newUrl.search;
260
- url.pathname = newUrl.pathname;
260
+ url.pathname = newUrl.pathname.toLowerCase();
261
261
  url.href = newUrl.href;
262
262
  return url;
263
263
  }
@@ -103,7 +103,13 @@ export class ServerlessEditingDataService {
103
103
  params,
104
104
  };
105
105
  debug.editing('storing editing data for %o: %o', previewData, data);
106
- return this.dataFetcher.put(url, data).then(() => {
106
+ return this.dataFetcher
107
+ .put(url, data, {
108
+ headers: {
109
+ 'Content-Type': 'application/json',
110
+ },
111
+ })
112
+ .then(() => {
107
113
  return previewData;
108
114
  });
109
115
  });
@@ -249,9 +249,9 @@ export class RedirectsMiddleware extends MiddlewareBase {
249
249
  return false;
250
250
  })
251
251
  .join('&');
252
- const newUrl = new URL(`${url.pathname}?${newQueryString}`, url.origin);
252
+ const newUrl = new URL(`${url.pathname.toLowerCase()}?${newQueryString}`, url.origin);
253
253
  url.search = newUrl.search;
254
- url.pathname = newUrl.pathname;
254
+ url.pathname = newUrl.pathname.toLowerCase();
255
255
  url.href = newUrl.href;
256
256
  return url;
257
257
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sitecore-jss/sitecore-jss-nextjs",
3
- "version": "22.6.0-canary.35",
3
+ "version": "22.6.0-canary.37",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "sideEffects": false,
@@ -74,9 +74,9 @@
74
74
  "react-dom": "^18.2.0"
75
75
  },
76
76
  "dependencies": {
77
- "@sitecore-jss/sitecore-jss": "22.6.0-canary.35",
78
- "@sitecore-jss/sitecore-jss-dev-tools": "22.6.0-canary.35",
79
- "@sitecore-jss/sitecore-jss-react": "22.6.0-canary.35",
77
+ "@sitecore-jss/sitecore-jss": "22.6.0-canary.37",
78
+ "@sitecore-jss/sitecore-jss-dev-tools": "22.6.0-canary.37",
79
+ "@sitecore-jss/sitecore-jss-react": "22.6.0-canary.37",
80
80
  "@vercel/kv": "^0.2.1",
81
81
  "prop-types": "^15.8.1",
82
82
  "regex-parser": "^2.2.11",
@@ -84,7 +84,7 @@
84
84
  },
85
85
  "description": "",
86
86
  "types": "types/index.d.ts",
87
- "gitHead": "5894627d1e8a23b0487f6bc4a405d88c22cddfc6",
87
+ "gitHead": "529d48e98cab8b5ed5b35814e6d3bb41fa1457aa",
88
88
  "files": [
89
89
  "dist",
90
90
  "types",