Merge branch 'main' into dev

This commit is contained in:
tresabhi committed 2024-11-17 15:35:42 -06:00
commit 0db4be4d20
2 files changed
+15 -13

No files matched your search

+1 -1
View File
@@ -22,7 +22,7 @@ env:
PUBLIC_ASSET_REPO: ${{ secrets.PUBLIC_ASSET_REPO }} PUBLIC_ASSET_REPO: ${{ secrets.PUBLIC_ASSET_REPO }}
PUBLIC_ASSET_BRANCH: ${{ secrets.PUBLIC_ASSET_BRANCH }} PUBLIC_ASSET_BRANCH: ${{ secrets.PUBLIC_ASSET_BRANCH }}
PUBLIC_PROMOTE_OPENTEST: ${{ secrets.PUBLIC_PROMOTE_OPENTEST }} PUBLIC_PROMOTE_OPENTEST: ${{ secrets.PUBLIC_PROMOTE_OPENTEST }}
ALLOW_ROBOTS: ${{ secrets.ALLOW_ROBOTS }} ALLOW_ROBOTS: true
WOTB_GLOSSARY: ${{ secrets.WOTB_GLOSSARY }} WOTB_GLOSSARY: ${{ secrets.WOTB_GLOSSARY }}
jobs: jobs:
+14 -12
View File
@@ -5,17 +5,19 @@ export async function GET({}: APIContext) {
const allowRobots = assertSecret(import.meta.env.ALLOW_ROBOTS) === 'true'; const allowRobots = assertSecret(import.meta.env.ALLOW_ROBOTS) === 'true';
const site = assertSecret(import.meta.env.SITE); const site = assertSecret(import.meta.env.SITE);
return new Response(` return new Response(
User-agent: * `
${allowRobots ? 'Allow' : 'Disallow'}: / User-agent: *
Allow: /
${ ${
allowRobots allowRobots
? ` ? `
Host: ${site} Host: ${site}
Sitemap: ${site}/sitemap-index.xml Sitemap: ${site}/sitemap-index.xml
` `
: '' : ''
} }
`); `.trim(),
);
} }