Bot detection for your Railway apps.
Add WebDecoy’s middleware to an Express, Next.js, Fastify or Hono app on Railway, or deploy a starter with it wired in. It sees the crawlers that never run JavaScript and reads the visitor’s real address through Railway’s proxy.
Set up WebDecoy on Railway
Start from a template or your app
Deploy one of five WebDecoy starters from Railway’s template marketplace (Express, Next.js, Fastify, Hono, Angular SSR), or install the WebDecoy package for your framework in an existing app.
Read the client IP Railway’s way
Pass trustProxy: 'railway' to the middleware. Railway’s proxy rewrites X-Forwarded-For to the visitor followed by its own edge, so the common one-hop setting records Railway’s edge for every visitor. The starters already set it.
Add your API key
Create an API key in WebDecoy and set WEBDECOY_API_KEY in the Railway service’s Variables. Keep it out of your repository.
Verify, then decide on enforcement
Request any page with the user agent WebDecoy-Test/1.0 and confirm the labeled test detection. The middleware starts in Monitor; switch it to Enforce when you trust what it flags.
See the requests a browser tag misses
AI crawlers and HTTP tools fetch pages without running JavaScript. Middleware sees every request that reaches your app, reports the automated ones, and plants a hidden link that only bots follow.
In Monitor it records what it would block and serves every request. In Enforce it answers blocked requests with a 403 inside your app. There is no edge validator on Railway; the policy runs in your code.
Five starters, one click each
Each starter is a small public repository with the middleware, the Railway client-IP setting and a health check already in place. Use one as a starting point or copy the few lines into your app.
Questions about Railway
Is there a Railway integration to install?
Railway has no add-on marketplace. The install is the WebDecoy SDK in your app, and the starters on Railway’s template marketplace have it wired in.
Does it block bots?
Not by default. The middleware starts in Monitor and serves every request. Enforce returns a 403 for blocked requests, and you choose when to switch.
What if Cloudflare sits in front of my Railway app?
Configure for the outermost proxy you control: trustProxy: 'cloudflare' reads Cloudflare’s client header, or count the extra hop.
Choose your platform
Start with the setup that matches where your site runs. Monitoring, request verification, and provider firewall actions are separate choices.
| Platform and setup guide | Detection | Protection |
|---|---|---|
| Netlify | Extension injects a crawler sensor at build time. | Opt-in clearance checks on protected paths; Monitor first, then Enforce. |
| Cloudflare | Managed Worker observes requests before your origin. | Worker clearance validation and separately configured WAF response actions. |
| Vercel | Log drain on Pro or Enterprise; Next.js SDK alternative. | Configure Firewall actions or SDK policy separately from the monitoring install. |
| AWS CloudFront | Browser script or SDK for detection. | Lambda@Edge clearance validator; optional AWS WAF integration. |
| WordPress | Plugin adds browser detection and decoy surfaces. | WordPress rules and form protection; an edge validator extends coverage before PHP. |
| Railway | SDK middleware for Express, Next.js, Fastify or Hono; one-click starters. | SDK policy in your app: Monitor first, then Enforce returns a 403. |
| Render | SDK middleware for Express, Next.js, Fastify or Hono; one-click starters. | SDK policy in your app: Monitor first, then Enforce returns a 403. |
| Shopify | App embed and Web Pixel cover storefront and checkout activity. | Order tagging and risk assessments support merchant decisions; no edge validator installed by the app. |