Skip to content

Commit

Permalink
fix(vite): proxy url for all services to prevent CORS
Browse files Browse the repository at this point in the history
  • Loading branch information
ifokeev committed Jan 22, 2024
1 parent b57ed84 commit 10014d8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .env
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
VITE_HASURA_GRAPHQL_ENDPOINT=http://localhost:8080/v1/graphql
VITE_HASURA_WS_ENDPOINT=ws://localhost:8080/v1/graphql
VITE_GRAPHQL_PLUS_SERVER_URL=http://localhost:8081
VITE_HASURA_GRAPHQL_ENDPOINT=/v1/graphql
VITE_HASURA_WS_ENDPOINT=/v1/graphql
VITE_GRAPHQL_PLUS_SERVER_URL=

CUBEJS_REST_PORT=4000
CUBEJS_SQL_PORT=13306
CUBEJS_PG_SQL_PORT=15432

VITE_CUBEJS_MYSQL_API_URL=localhost:${CUBEJS_SQL_PORT}
VITE_CUBEJS_PG_API_URL=localhost:${CUBEJS_PG_SQL_PORT}
VITE_CUBEJS_REST_API_URL=http://localhost:8000/api/v1/load
VITE_CUBEJS_REST_API_URL=/api/v1/load
VITE_CUBEJS_API_DOCS_URL=http://localhost:${CUBEJS_REST_PORT}/docs
2 changes: 2 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ export default defineConfig({
server: {
port: 8000,
proxy: {
"/v1/graphql": "http://localhost:8080",
"/auth": "http://localhost:8081",
"/api/v1": "http://localhost:4000",
},
},
Expand Down

0 comments on commit 10014d8

Please sign in to comment.