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
7 changes: 6 additions & 1 deletion docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@
"family": "Nunito Sans"
}
},
"seo": {
"metatags": {
"canonical": "https://ngrok.com/docs"
}
},
"favicon": "favicon.ico",
"logo": {
"light": "/logo/light.svg",
Expand Down Expand Up @@ -169,7 +174,7 @@
]
},
{
"group": "Examples",
"group": "Examples",
"pages": [
"universal-gateway/examples",
"universal-gateway/examples/front-door-pattern",
Expand Down
20 changes: 20 additions & 0 deletions redirect-to-ngrok.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Redirect to ngrok.com domain if not already there
// This only runs in production (ngrok.mintlify.dev), not in preview/branch deployments
(function() {
var hostname = window.location.hostname;

// Skip redirect if already on ngrok.com
if (hostname === 'ngrok.com') {
return;
}

// Only redirect from the main production Mintlify domain
// Preview deployments have different hostnames and should not redirect
if (hostname !== 'ngrok.mintlify.dev') {
return;
}

// Perform the redirect, preserving the path and search params
var newUrl = 'https://ngrok.com' + window.location.pathname + window.location.search + window.location.hash;
window.location.replace(newUrl);
})();
2 changes: 2 additions & 0 deletions robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
User-agent: *
Disallow: /