Skip to content

Commit 163aefa

Browse files
authored
Merge pull request #3052 from SalesforceCommerceCloud/jbothra-sf/@W-17514374-add-robot-txt-signed
@W-17514374 Add robots.txt to mrt-reference-app.
2 parents b1ecd5b + 0fd93db commit 163aefa

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

packages/template-mrt-reference-app/app/ssr.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@ const runtime = getRuntime()
350350

351351
const {handler, app, server} = runtime.createHandler(options, (app) => {
352352
app.get('/favicon.ico', runtime.serveStaticFile('static/favicon.ico'))
353+
app.get('/robots.txt', runtime.serveStaticFile('static/robots.txt'))
353354

354355
// Add middleware to explicitly suppress caching on all responses (done
355356
// before we invoke the handlers)
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
User-agent: *
2+
Disallow: /

packages/template-mrt-reference-app/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@
4545
"node_modules/**/*.*"
4646
],
4747
"ssrShared": [
48-
"static/example.txt"
48+
"static/example.txt",
49+
"static/favicon.ico",
50+
"static/robots.txt"
4951
]
5052
},
5153
"dependencies": {

0 commit comments

Comments
 (0)