fix: robots.txt
This commit is contained in:
parent
e6b6f547bb
commit
409dbbca3f
|
@ -4,8 +4,14 @@ import { genResponse } from '../response';
|
|||
* @param {Request} req
|
||||
*/
|
||||
export async function get(req) {
|
||||
const robots = 'User-agent: *\nDisallow: /';
|
||||
return await genResponse(req, robots, {
|
||||
const robots = [
|
||||
'User-agent: *',
|
||||
'Allow: /robots.txt$',
|
||||
'Allow: /favicon.ico$',
|
||||
'Allow: /$',
|
||||
'Disallow: /',
|
||||
];
|
||||
return await genResponse(req, robots.join('\n'), {
|
||||
status: 200,
|
||||
headers: {
|
||||
'Content-Type': 'text/plain; charset=utf-8',
|
||||
|
|
Loading…
Reference in New Issue