Skip to content

Commit

Permalink
UI: Fix dev routing for S3 GW (#7801)
Browse files Browse the repository at this point in the history
  • Loading branch information
N-o-Z committed May 26, 2024
1 parent deac06d commit 805d429
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions webui/vite.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import react from '@vitejs/plugin-react-swc';
import eslintPlugin from 'vite-plugin-eslint';
import replace from '@rollup/plugin-replace';
import { splitVendorChunkPlugin } from 'vite';
import * as http from "node:http";

// https://vitejs.dev/config/
export default ({ command }) => {
Expand Down Expand Up @@ -48,6 +49,17 @@ export default ({ command }) => {
target: 'http://localhost:8000',
changeOrigin: false,
secure: false
},
'/': {
target: 'http://localhost:8000',
changeOrigin: false,
secure: false,
bypass: (req: http.IncomingMessage) : void | null | undefined | false | string => {
if ("x-amz-date" in req.headers) {
return null;
}
return req.url;
}
}
}
},
Expand Down

0 comments on commit 805d429

Please sign in to comment.