nitro icon indicating copy to clipboard operation
nitro copied to clipboard

Error proxying Drizzle Studio

Open ssahillppatell opened this issue 4 months ago • 1 comments

Environment

bun: 1.2.19 nitropack: latest drizzle-orm: ^0.44.2 drizzle-kit: ^0.31.1

Reproduction

Steps:

  1. Run Drizzle Studio
  2. Proxy like this:
routeRules: {
	"/studio/**": {
		proxy: { to: "https://local.drizzle.studio/**"},
	},
}

Describe the bug

I am trying to proxy drizzle studio, like this:

routeRules: {
	"/studio/**": {
		proxy: { to: "https://local.drizzle.studio/**"},
	},
}

Now this is not working. As drizzle-studio makes a call for /index.js. So instead of returning the index.js file from drizzle-studio, it is returning 404.

this call was being made: http://localhost:4000/index.js

Instead it should be a proxied call to https://local.drizzle.studio/index.js

Additional context

I found a solution for this:

routeRules: {
	"/proxy/studio/**": {
		proxy: { to: "https://local.drizzle.studio/**"},
	},
	"/proxy/index.js": {
		proxy: { to: "https://local.drizzle.studio/index.js"},
	},
}

but this is not ideal

Logs


ssahillppatell avatar Aug 20 '25 07:08 ssahillppatell

Even though I think this is drizzle issue. I thought it was worth mentioning here as well.

ssahillppatell avatar Aug 20 '25 07:08 ssahillppatell