@plasmicapp/nextjs-app-router 1.0.7 → 1.0.8
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/README.md +11 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -100,6 +100,15 @@ async function withExtractPlasmicQueryData(
|
|
|
100
100
|
// to extract query data.
|
|
101
101
|
newSearchParams.set("plasmicSsr", "true");
|
|
102
102
|
|
|
103
|
+
if (process.env.VERCEL_AUTOMATION_BYPASS_SECRET) {
|
|
104
|
+
// If protection bypass is enabled, use it to ensure fetching from
|
|
105
|
+
// the SSR endpoint will not return the authentication page HTML
|
|
106
|
+
newSearchParams.set(
|
|
107
|
+
"x-vercel-protection-bypass",
|
|
108
|
+
process.env.VERCEL_AUTOMATION_BYPASS_SECRET
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
|
|
103
112
|
// Fetch the data from the endpoint using the new search params
|
|
104
113
|
const prefetchedQueryData = await fetchExtractedQueryData(
|
|
105
114
|
`${prepassHost}${pathname}?${newSearchParams.toString()}`
|
|
@@ -138,6 +147,8 @@ module.exports = {
|
|
|
138
147
|
|
|
139
148
|
The `PLASMIC_PREPASS_SERVER` environment variable will be set by with-plasmic-prepass.
|
|
140
149
|
|
|
150
|
+
3. If you are deploying to Vercel, make sure to either disable [Vercel Authentication](https://vercel.com/docs/security/deployment-protection/methods-to-protect-deployments/vercel-authentication) or provide the [Protection Bypass](https://vercel.com/docs/security/deployment-protection/methods-to-bypass-deployment-protection/protection-bypass-automation) (Note: this is a paid feature). This is to ensure the SSR endpoint will not return Vercel's page authentication HTML.
|
|
151
|
+
|
|
141
152
|
So...
|
|
142
153
|
|
|
143
154
|
- At dev time, uses itself for extracting query data (hits `localhost:${PORT}`)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plasmicapp/nextjs-app-router",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.8",
|
|
4
4
|
"types": "./dist/index.d.ts",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.esm.js",
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"react": "^18.2.0",
|
|
71
71
|
"typescript": "^5.2.2"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "0597c84c0fa0df12523bfdbc1ba21ce81d34d63c"
|
|
74
74
|
}
|