Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion apps/webapp/app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ export const meta: MetaFunction = ({ data }) => {
},
{
name: "robots",
content: typedData.features.isManagedCloud ? "index, follow" : "noindex, nofollow",
content:
typeof window === "undefined" || window.location.hostname !== "cloud.trigger.dev"
? "noindex, nofollow"
: "index, follow",
},
];
};
Expand Down
5 changes: 5 additions & 0 deletions apps/webapp/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ if (process.env.HTTP_SERVER_DISABLED !== "true") {
// helpful headers:
res.set("Strict-Transport-Security", `max-age=${60 * 60 * 24 * 365 * 100}`);

// Add X-Robots-Tag header for test-cloud.trigger.dev
if (req.hostname !== "cloud.trigger.dev") {
res.set("X-Robots-Tag", "noindex, nofollow");
}

// /clean-urls/ -> /clean-urls
if (req.path.endsWith("/") && req.path.length > 1) {
const query = req.url.slice(req.path.length);
Expand Down