Skip to content

Commit

Permalink
Move the robots.txt file to Effect
Browse files Browse the repository at this point in the history
Refs #1834
  • Loading branch information
thewilkybarkid committed Sep 11, 2024
1 parent fa0756c commit 5fbf437
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
1 change: 1 addition & 0 deletions src/Router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,5 @@ export const Router = pipe(
),
),
),
HttpRouter.get('/robots.txt', HttpServerResponse.text('User-agent: *\nAllow: /')),
)
4 changes: 0 additions & 4 deletions src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,6 @@ export const app = (config: ConfigEnv) =>
strictTransportSecurity: config.publicUrl.protocol === 'https:',
}),
)
.get('/robots.txt', (req, res) => {
res.type('text/plain')
res.send('User-agent: *\nAllow: /')
})
.use(
express.static('dist/assets', {
setHeaders: (res, path) => {
Expand Down

0 comments on commit 5fbf437

Please sign in to comment.