updateSiteConfig()
How to update Site Config within Nitro.
Same as updateSiteConfig but you will need to provide the request context.
WarningWhen using this, you will 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 '#imports'
export default defineEventHandler((e) => {
updateSiteConfig(e, {
name: 'My Site',
url: 'https://example.com',
})
})
Did this page help you?