8000 Nginx 502 Bad Gateway error when proxying prerendered pages with Cloudflare Pages · Issue #4395 · TanStack/router · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Nginx 502 Bad Gateway error when proxying prerendered pages with Cloudflare Pages #4395
Open
@mladenovic-13

Description

@mladenovic-13

Which project does this relate to?

Start

Describe the bug

When enabling prerendering for marketing pages in a TanStack Start application deployed to Cloudflare Pages, nginx reverse proxy returns 502 Bad Gateway errors when accessing these prerendered routes.

Your Example Website or App

/

Steps to Reproduce the Bug or Issue

  1. Enable prerendering in vite.config.ts:
tanstackStart({
  target: 'cloudflare-pages',
  pages: [
    { path: '/', prerender: { enabled: true, crawlLinks: false } },
    { path: '/about-us', prerender: { enabled: true, crawlLinks: false } },
    { path: '/careers', prerender: { enabled: true, crawlLinks: false } },
    // ... other marketing pages
  ],
})
  1. Build the application: npm run build
  2. Deploy to Cloudflare Pages
  3. Set up nginx reverse proxy to Cloudflare Pages worker
  4. Access any prerendered route (e.g., /about-us)

Expected behavior

Prerendered pages should be served correctly through nginx proxy.

Screenshots or Videos

No response

Platform

  • OS: macOS
  • Browser: Chrome

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0