@uniformdev/canvas-next 19.36.0 → 19.36.1-alpha.4
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/route/index.js +3 -2
- package/dist/route/index.mjs +3 -2
- package/package.json +7 -7
package/dist/route/index.js
CHANGED
|
@@ -472,15 +472,16 @@ function createRouteFetcher(options) {
|
|
|
472
472
|
|
|
473
473
|
// src/route/withUniformGetServerSideProps.ts
|
|
474
474
|
var withUniformGetServerSideProps2 = (options) => {
|
|
475
|
-
const defaultHandleRedirect = (requestUrl, matched) => {
|
|
475
|
+
const defaultHandleRedirect = (requestUrl, matched, context) => {
|
|
476
476
|
if (matched.redirect.targetStatusCode > 400) {
|
|
477
477
|
return {
|
|
478
478
|
notFound: true
|
|
479
479
|
};
|
|
480
480
|
}
|
|
481
|
+
const absoluteUrl = `${context.req.headers["x-forwarded-proto"]}://${context.req.headers.host}${requestUrl}`;
|
|
481
482
|
return {
|
|
482
483
|
redirect: {
|
|
483
|
-
destination: import_redirect.RedirectClient.getTargetVariableExpandedUrl(
|
|
484
|
+
destination: import_redirect.RedirectClient.getTargetVariableExpandedUrl(absoluteUrl, matched.redirect),
|
|
484
485
|
statusCode: matched.redirect.targetStatusCode
|
|
485
486
|
}
|
|
486
487
|
};
|
package/dist/route/index.mjs
CHANGED
|
@@ -199,15 +199,16 @@ function createRouteFetcher(options) {
|
|
|
199
199
|
|
|
200
200
|
// src/route/withUniformGetServerSideProps.ts
|
|
201
201
|
var withUniformGetServerSideProps = (options) => {
|
|
202
|
-
const defaultHandleRedirect = (requestUrl, matched) => {
|
|
202
|
+
const defaultHandleRedirect = (requestUrl, matched, context) => {
|
|
203
203
|
if (matched.redirect.targetStatusCode > 400) {
|
|
204
204
|
return {
|
|
205
205
|
notFound: true
|
|
206
206
|
};
|
|
207
207
|
}
|
|
208
|
+
const absoluteUrl = `${context.req.headers["x-forwarded-proto"]}://${context.req.headers.host}${requestUrl}`;
|
|
208
209
|
return {
|
|
209
210
|
redirect: {
|
|
210
|
-
destination: RedirectClient.getTargetVariableExpandedUrl(
|
|
211
|
+
destination: RedirectClient.getTargetVariableExpandedUrl(absoluteUrl, matched.redirect),
|
|
211
212
|
statusCode: matched.redirect.targetStatusCode
|
|
212
213
|
}
|
|
213
214
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/canvas-next",
|
|
3
|
-
"version": "19.36.
|
|
3
|
+
"version": "19.36.1-alpha.4+99b59c404",
|
|
4
4
|
"description": "Next.js SDK for Uniform Canvas",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -63,11 +63,11 @@
|
|
|
63
63
|
"document": "api-extractor run --local"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@uniformdev/canvas": "19.36.
|
|
67
|
-
"@uniformdev/canvas-react": "19.36.
|
|
68
|
-
"@uniformdev/project-map": "19.36.
|
|
69
|
-
"@uniformdev/redirect": "19.36.
|
|
70
|
-
"@uniformdev/richtext": "19.36.
|
|
66
|
+
"@uniformdev/canvas": "19.36.1-alpha.4+99b59c404",
|
|
67
|
+
"@uniformdev/canvas-react": "19.36.1-alpha.4+99b59c404",
|
|
68
|
+
"@uniformdev/project-map": "19.36.1-alpha.4+99b59c404",
|
|
69
|
+
"@uniformdev/redirect": "19.36.1-alpha.4+99b59c404",
|
|
70
|
+
"@uniformdev/richtext": "19.36.1-alpha.4+99b59c404",
|
|
71
71
|
"colorette": "2.0.20"
|
|
72
72
|
},
|
|
73
73
|
"peerDependencies": {
|
|
@@ -87,5 +87,5 @@
|
|
|
87
87
|
"publishConfig": {
|
|
88
88
|
"access": "public"
|
|
89
89
|
},
|
|
90
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "99b59c4046213b258e6610258c603878c490a0b9"
|
|
91
91
|
}
|