drizzle-team / drizzle-team/drizzle-orm

[BUG]: Error proxying Drizzle Studio

Open
#4,871 3 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
35.8k
Forks
1.6k
Avg merge
2d 7h
Merged PRs (30d)
4

Description

### Report hasn't been filed before.

- [x] I have verified that the bug I'm about to report hasn't been filed before.

### What version of `drizzle-orm` are you using?

0.44.2

### What version of `drizzle-kit` are you using?

0.31.1

### Other packages

_No response_

### Describe the Bug

I am trying to proxy drizzle-studio, like this:

```ts
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 non-ideal solution:
```ts
routeRules: {
"/proxy/studio/**": {
proxy: { to: "https://local.drizzle.studio/**"},
},
"/proxy/index.js": {
proxy: { to: "https://local.drizzle.studio/index.js"},
},
}
```

Linking the bug I raised at nitro unjs: https://github.com/nitrojs/nitro/issues/3541

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.