Skip to content

Commit 787eaae

Browse files
globalQueryConfig to be configured in nuxt config
1 parent d487f11 commit 787eaae

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

lib/module.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ module.exports = function kenticokontent (moduleOptions) {
55
projectId: process.env.KENTICOKONTENT_PROJECTID || '',
66
previewApiKey: process.env.KENTICOKONTENT_PREVIEWAPIKEY || null,
77
enableAdvancedLogging: process.env.KENTICOKONTENT_ENABLEADVANCEDLOGGING || false,
8-
enablePreviewMode: process.env.KENTICOKONTENT_ENABLEPREVIEWMODE || false,
8+
globalQueryConfig: {
9+
usePreviewMode: process.env.KENTICOKONTENT_ENABLEPREVIEWMODE || false
10+
},
911
defaultLanguage: process.env.KENTICOKONTENT_DEFAULTLANGUAGE || null,
1012
retryAttempts: process.env.KENTICOKONTENT_RETRYATTEMPTS || null,
1113
baseUrl: process.env.KENTICOKONTENT_BASEURL || null,

lib/templates/plugin.template.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,7 @@ export default (ctx, inject) => {
66
let settings = JSON.parse('KENTICOOPTIONS')
77

88
// Add tracking header
9-
settings = Object.assign({}, settings, {
10-
globalQueryConfig: {
11-
customHeaders: [
12-
{ header: 'X-KC-SOURCE', value: 'kentico-kontent-nuxt-module' }
13-
]
14-
}
15-
})
9+
settings = Object.assign({}, settings)
1610

1711
const deliveryClient = new DeliveryClient(settings)
1812

0 commit comments

Comments
 (0)