updateSiteConfig()
Same as updateSiteConfig but you will need to provide the request context.
When using this, you will need to run it as early as possible within the request lifecycle to avoid conflicts. It's
recommended to run this either in a Nitro plugin or a nitro middleware.
Usage
serverMiddleware.ts
import { defineEventHandler } from 'nuxt/server'
import { updateSiteConfig } from '#site-config/server'
export default defineEventHandler((e) => {
updateSiteConfig(e, {
name: 'My Site',
url: 'https://example.com',
})
})Was this page helpful?
Related
Was this page helpful?