@quintype/framework 7.34.5-qlitics-removal-task.2 → 7.34.5-qlitics-removal-task.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quintype/framework",
|
|
3
|
-
"version": "7.34.5-qlitics-removal-task.
|
|
3
|
+
"version": "7.34.5-qlitics-removal-task.4",
|
|
4
4
|
"description": "Libraries to help build Quintype Node.js apps",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"engines": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@ampproject/toolbox-optimizer": "2.8.3",
|
|
34
34
|
"@grpc/grpc-js": "^1.12.5",
|
|
35
35
|
"@jsdoc/salty": "^0.2.9",
|
|
36
|
-
"@quintype/amp": "2.22.1-
|
|
36
|
+
"@quintype/amp": "2.22.1-amp-access-flag.3",
|
|
37
37
|
"@quintype/backend": "^2.7.0",
|
|
38
38
|
"@quintype/components": "^3.5.0",
|
|
39
39
|
"@quintype/prerender-node": "^3.2.26",
|
|
@@ -68,6 +68,8 @@ async function ampStoryPageHandler(
|
|
|
68
68
|
|
|
69
69
|
return res.redirect(301, redirectUrl);
|
|
70
70
|
}
|
|
71
|
+
const enableAmpAccess = get(opts, ["enableAmpAccess"], false);
|
|
72
|
+
const isAmpAccessEnabled = typeof enableAmpAccess === "function" && opts.enableAmpAccess(story);
|
|
71
73
|
|
|
72
74
|
const domainSpecificOpts = getDomainSpecificOpts(opts, domainSlug);
|
|
73
75
|
const url = urlLib.parse(req.url, true);
|
|
@@ -144,6 +146,13 @@ async function ampStoryPageHandler(
|
|
|
144
146
|
});
|
|
145
147
|
merge(mergedAdditionalConfig, additionalConfig, fetchedAdditionalConfig);
|
|
146
148
|
}
|
|
149
|
+
// the query appending happens in the worker, this is needed for any publisher who needs ad-free in amp story
|
|
150
|
+
if(req && req.query && req.query.subscriber === "true") {
|
|
151
|
+
merge(additionalConfig, { subscriber: true });
|
|
152
|
+
}
|
|
153
|
+
if (isAmpAccessEnabled) {
|
|
154
|
+
merge(additionalConfig, { isAmpAccessEnabled: isAmpAccessEnabled });
|
|
155
|
+
}
|
|
147
156
|
const optimizeAmpHtml = get(domainSpecificOpts, ["featureConfig", "optimizeAmpHtml"], true);
|
|
148
157
|
const ampHtml = ampifyStory({
|
|
149
158
|
story,
|