diff --git a/src/main/webapp/src/utils/auth.js b/src/main/webapp/src/utils/auth.js index 1465ddf..6365901 100644 --- a/src/main/webapp/src/utils/auth.js +++ b/src/main/webapp/src/utils/auth.js @@ -15,7 +15,7 @@ export function check_validity(online_callback = () => { if (online_callback) online_callback(false); else return false; if (online_callback) { - return axios.get(`${vite_url}/auth-api/userinfo`, { + return axios.get(`${auth_url}/userinfo`, { headers: { Authorization: `Bearer ${token}` } @@ -32,7 +32,7 @@ export function check_validity(online_callback = () => { } export function sendTokenRequest(refresh) { - return axios.post(`${vite_url}/auth-api/token`, { + return axios.post(`${auth_url}/token`, { client_id: client_id, redirect_uri: `${vite_url}/complete/auth/`, grant_type: 'refresh_token', @@ -54,7 +54,7 @@ export function sendTokenRequest(refresh) { } export function sendTokenRequestPart2(code, state) { - axios.post(`${vite_url}/auth-api/token`, { + axios.post(`${auth_url}/token`, { client_id: client_id, redirect_uri: `${vite_url}/complete/auth/`, code: code, @@ -95,7 +95,7 @@ function clearNext() { } export function logout(token, refresh) { - return axios.post(`${vite_url}/auth-api/revoke`, { + return axios.post(`${auth_url}/revoke`, { client_id: client_id, token: refresh, }, { diff --git a/src/main/webapp/vite.config.js b/src/main/webapp/vite.config.js index 9f601e5..db8cfd5 100644 --- a/src/main/webapp/vite.config.js +++ b/src/main/webapp/vite.config.js @@ -10,21 +10,6 @@ export default ({mode}) => { server: { host: process.env.VITE_INT_HOST, port: process.env.VITE_INT_PORT, - proxy: { - // $VITE_URL/api* -> $VITE_API_URL/api* - "/api": { - target: process.env.VITE_API_URL, - changeOrigin: true, - rewrite: (path) => path.replace(/^\/api/, ""), - }, - // $VITE_URL/auth-api* -> $VITE_AUTH_URL* - "^/auth-api": { - target: process.env.VITE_AUTH_URL, - changeOrigin: true, - secure: true, - rewrite: (path) => path.replace(/^\/auth-api/, ""), - }, - }, }, }); }; \ No newline at end of file