Commit 59486f8
committed
fix(router): skip static fallback for /odc_query to allow ODC proxy
The static middleware Skipper at internal/apiserver/service/router.go
only skipped /cloudbeaver, /provision/v, /sqle/v and /swagger paths.
Requests to /odc_query/ (with trailing slash), /odc_query/index.html
and any /odc_query/<spa-path> were intercepted by the DMS HTML5 SPA
fallback and got served as the DMS index.html (873B), instead of the
real ODC umi index.html (~11KB).
This broke the DMS UI 'SQL Workbench' entry whenever the link used
the trailing-slash form (`/odc_query/?dsId=...`). Without the fix
the browser landed on the DMS dashboard rather than the ODC SQL
workbench, even though API and subresource proxy targets at
`/odc_query/*` worked fine.
Add a HasPrefix check against
SqlWorkbenchController.SqlWorkbenchService.GetRootUri() (==/odc_query)
at the top of the Skipper so all `/odc_query` and `/odc_query/...`
requests bypass StaticConfig and reach the existing
ProxyWithConfig rewrite (`/odc_query/*` -> `/$1`) targeting ODC 8989.
Refs: dms-ee#8651 parent 77260e8 commit 59486f8
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
451 | 451 | | |
452 | 452 | | |
453 | 453 | | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
454 | 461 | | |
455 | 462 | | |
456 | 463 | | |
| |||
0 commit comments