We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We should deliver possibility to override middleware https://github.com/TYPO3-Initiatives/nuxt-typo3/blob/master/lib/templates/middleware/context.js#L38 in an easy way. Additionally we should deliver own hooks (https://nuxtjs.org/docs/configuration-glossary/configuration-hooks) to override context and page response in specific cases.
potentially places to use hooks:
if (response.data.redirectUrl) { if (process.server) { return context.redirect( response.data.statusCode || 301, response.data.redirectUrl ) } else if (process.client && typeof window !== 'undefined') { window.location.href = response.data.redirectUrl return context.next(false) }
for example you may want to return specific headers with this redirect response.
context.pageContent = response.data context.store.commit(SET_PAGE, response.data)
to override it in specific cases.
hooks should gives context and current page slug as a parameters it should be documented with examples
The text was updated successfully, but these errors were encountered:
refactor: context middleware (#156)
27fd01b
a071de0
14a30a2
7bda32c
669909a
mercs600
Successfully merging a pull request may close this issue.
We should deliver possibility to override middleware https://github.com/TYPO3-Initiatives/nuxt-typo3/blob/master/lib/templates/middleware/context.js#L38 in an easy way.
Additionally we should deliver own hooks (https://nuxtjs.org/docs/configuration-glossary/configuration-hooks) to override context and page response in specific cases.
potentially places to use hooks:
for example you may want to return specific headers with this redirect response.
to override it in specific cases.
hooks should gives context and current page slug as a parameters
it should be documented with examples
The text was updated successfully, but these errors were encountered: