diff --git a/src/runtime/nitro/server/__robots__/debug.ts b/src/runtime/nitro/server/__robots__/debug.ts index f2fb8b15..d935cf84 100644 --- a/src/runtime/nitro/server/__robots__/debug.ts +++ b/src/runtime/nitro/server/__robots__/debug.ts @@ -1,9 +1,10 @@ -import { getSiteRobotConfig, useRuntimeConfig, useSiteConfig } from '#imports' +import { useRuntimeConfig, useSiteConfig } from '#imports' import { defineEventHandler, getQuery } from 'h3' +import { getSiteRobotConfig } from '../../composables/getSiteRobotConfig' export default defineEventHandler(async (e) => { const runtimeConfig = useRuntimeConfig(e)['nuxt-robots'] - const { indexable, hints } = await getSiteRobotConfig(e) + const { indexable, hints } = getSiteRobotConfig(e) const siteConfig = useSiteConfig(e) const robotsTxt = await e.$fetch('/robots.txt', { query: getQuery(e), diff --git a/src/runtime/nitro/server/robots-txt.ts b/src/runtime/nitro/server/robots-txt.ts index 8641156e..25b915b2 100644 --- a/src/runtime/nitro/server/robots-txt.ts +++ b/src/runtime/nitro/server/robots-txt.ts @@ -1,7 +1,8 @@ import type { HookRobotsConfigContext, HookRobotsTxtContext } from '../../types' -import { getSiteRobotConfig, useNitroApp, useRuntimeConfig, withSiteUrl } from '#imports' +import { useNitroApp, useRuntimeConfig, withSiteUrl } from '#imports' import { defineEventHandler, setHeader } from 'h3' import { asArray, generateRobotsTxt } from '../../util' +import { getSiteRobotConfig } from '../composables/getSiteRobotConfig' import { resolveRobotsTxtContext } from '../util' export default defineEventHandler(async (e) => {