Skip to content

Commit

Permalink
fix(robots): fix host
Browse files Browse the repository at this point in the history
  • Loading branch information
harlan-zw committed Dec 17, 2022
1 parent bd50cf3 commit 6375904
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/routes/robots.txt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ import { defineEventHandler, setHeader } from 'h3'

export default defineEventHandler(async (event) => {
setHeader(event, 'Content-Type', 'text/plain')
const debug = process.dev ? (`# Dev Mode: Generated by nuxt-seo-kit for ${config.host}. Indexing is ${config.indexable ? 'allowed' : 'disallowed'}\n`) : ''
return `${debug}User-agent: *\nDisallow: ${config.indexable ? `\nSitemap: ${config.host}/sitemap.xml` : '/'}`
const debug = process.dev ? (`# Dev Mode: Generated by nuxt-seo-kit for ${config.hostname}. Indexing is ${config.indexable ? 'allowed' : 'disallowed'}\n`) : ''
return `${debug}User-agent: *\nDisallow: ${config.indexable ? `\nSitemap: ${config.hostname}/sitemap.xml` : '/'}`
})

0 comments on commit 6375904

Please sign in to comment.