Skip to content

06-workshops - [Bug] 07-Temporal Policies: Redirect loop when setting Vite base to /app/5173/ #2032

Description

@psinhasa

In which component is this bug present?

  • 01-AgentCore-runtime
  • 02-AgentCore-gateway
  • 03-AgentCore-identity
  • 04-AgentCore-memory
  • 05-AgentCore-tools
  • 06-AgentCore-observability
  • 07-AgentCore-E2E

Bug Description

Symptom: "The page isn't redirecting properly"

Setting base: "/app/5173/" in vite.config.ts fixes asset URLs in HTML, but also makes Vite's dev server enforce that base path. Since nginx strips /app/5173/ before forwarding:

  1. Browser → GET /app/5173/ → nginx strips prefix → sends GET / to Vite
  2. Vite sees GET / doesn't match base /app/5173/ → responds 302 → /app/5173/
  3. Browser follows redirect → GET /app/5173/ → back to step 1 → infinite loop

Suggested Fix
Use base: "./" instead and build the app with npx vite build rather than using the Vite dev server. Serve the static build with a simple Node.js server.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions