Skip to content

Error when using Void routing rewrite: 'A header value for "X-Void-Routing" contains non-ASCII characters' #54

Description

@johnfraney

I'm seeing the following error when using a routing rewrite in Void 0.9.0:

A header value for "X-Void-Routing" contains non-ASCII characters: "rewrite[/api/auth*] → /api/auth (void.json#routing.rewrites)"

Here's my routing configuration in void.json:

  "routing": {
    "rewrites": {
      "/api/auth/*": "/api/auth"
    }
  }

And the header from the Firefox dev tools network tab:

x-void-routing
	rewrite[/api/auth*] � /api/auth (void.json#routing.rewrites)

It looks like the is the culprit.

I'm seeing the same error when rewriting the path in middleware, like:

  if (c.req.path.startsWith("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/api/auth/")) {
    return c.rewrite("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/api/auth")
  }

(I'm setting up Better Auth with D1 + Drizzle directly for a Cloudflare deployment since I'm not part of the private beta. Let me know if these bug reports are annoying!)

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions