-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'bugfix/page-hook-with-patches' into release/2.4.11
- Loading branch information
Showing
13 changed files
with
183 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# Temporary files | ||
node_modules | ||
*.log* | ||
*.log | ||
.nuxt | ||
.nitro | ||
.cache | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
export const useLogger = () => { | ||
const { $logger } = useNuxtApp() | ||
const noop = () => {} | ||
|
||
if (process.server) { | ||
return $logger | ||
} | ||
|
||
return { | ||
debug: noop, | ||
info: noop, | ||
warning: noop, | ||
error: noop | ||
} | ||
} | ||
|
||
export default useLogger |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { useRequestHeaders } from '#imports' | ||
|
||
export const useSectionId = (): string => { | ||
const sectionIdHeaderName = 'x-request-id' | ||
const requestHeaders = useRequestHeaders([sectionIdHeaderName]) | ||
return requestHeaders[sectionIdHeaderName] || 'no section id' | ||
} | ||
|
||
export default useSectionId |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { defineNuxtPlugin } from '#app' | ||
import { logger } from '@dpc-sdp/ripple-tide-api' | ||
|
||
export default defineNuxtPlugin(() => { | ||
return { | ||
provide: { | ||
logger | ||
} | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export default defineNuxtPlugin((nuxtApp) => { | ||
// Remove path from nuxt payload to prevent query params from being stripped | ||
// The path we are removing is the path that was cached during the server side render | ||
// https://github.com/nuxt/nuxt/pull/21408 | ||
// https://github.com/nuxt/nuxt/issues/23153 | ||
delete nuxtApp?.payload?.path | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.