Skip to content

Commit

Permalink
Merge pull request #222 from webzard-io/bowen/dev
Browse files Browse the repository at this point in the history
build: fix local dev
  • Loading branch information
MrWindlike authored Mar 3, 2025
2 parents da68ffd + e35a927 commit 112f1cb
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ src/sunmao/**/*.yaml

.yalc
yalc.lock
.env
5 changes: 3 additions & 2 deletions packages/refine/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,11 @@ function App() {
}, []);

const globalStore = useMemo(() => {
const clusterName = import.meta.env.VITE_CLUSTER_NAME || 'clusterName';
return new GlobalStore(
{
apiUrl: '/api/sks-proxy/api/v1/clusters/obs/proxy',
watchWsApiUrl: 'api/sks-ws/sks-proxy/api/v1/clusters/obs/proxy',
apiUrl: `/api/sks-proxy/api/v1/clusters/${clusterName}/proxy`,
watchWsApiUrl: `api/sks-ws/sks-proxy/api/v1/clusters/${clusterName}/proxy`,
prefix: 'default',
plugins: ProviderPlugins,
},
Expand Down
13 changes: 8 additions & 5 deletions packages/refine/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ export default defineConfig({
'/api': {
target: process.env.API_HOST || 'http://192.168.30.67',
ws: true,
headers: {
'x-skip-auth-verify': 'true',
'Accept-Encoding': 'identity'
headers: {
'Accept-Encoding': 'identity',
'Authorization': process.env.REACT_APP_DEV_TOKEN,
'Cookie': process.env.REACT_APP_DEV_COOKIE,
},
secure: false,
},
Expand All @@ -36,8 +37,10 @@ export default defineConfig({
return path.replace('/exec-proxy', '');
},
ws: true,
headers: {
Authorization: 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJ4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4IiwiaWF0IjoxNzE3NDk0OTIxfQ.GPW3AWxK1zqirbCP4OQJZ4VoDmLXLLgDjR_EjFcsqHQ',
headers: {
'Accept-Encoding': 'identity',
'Authorization': process.env.REACT_APP_DEV_TOKEN,
'Cookie': process.env.REACT_APP_DEV_COOKIE,
},
secure: false,
},
Expand Down

0 comments on commit 112f1cb

Please sign in to comment.