このコミットが含まれているのは:
2026-10-18 22:14:40 +09:00
コミット e0970a81a4
6個のファイルの変更、394行の追加、241行の削除
+9 -1
ファイルの表示
@@ -55,7 +55,15 @@ createServer (async (request, response) => {
return
}
const result = await render (url.pathname + url.search, origin, apiBaseURL)
const html = result == null ? template : template
if (result?.location != null)
{
response.writeHead (result.status, { Location: result.location }).end ()
return
}
const html = result?.html == null
? template.replace ('<!-- helmet -->', result?.status === 404
? '<meta name="robots" content="noindex" data-rh="true">' : '')
: template
.replace ('lang="ja"', `lang="${result.locale}"`)
.replace (/<title>[\s\S]*?<\/title>/, '')
.replace (/<meta name="description"[^>]*>/, '')