mirror of
https://github.com/Dvorinka/ClubLogos.git
synced 2026-06-03 19:42:58 +00:00
fef
This commit is contained in:
@@ -2,7 +2,7 @@ import './style.css'
|
|||||||
import gsap from 'gsap'
|
import gsap from 'gsap'
|
||||||
|
|
||||||
// Configuration
|
// Configuration
|
||||||
const API_BASE_URL = '' // Requests will be made to the same origin, and Vite will proxy /logos to the backend
|
const API_BASE_URL = window.location.hostname === 'localhost' ? '/api' : 'http://localhost:8080'
|
||||||
|
|
||||||
// Get UUID from URL
|
// Get UUID from URL
|
||||||
const urlParams = new URLSearchParams(window.location.search)
|
const urlParams = new URLSearchParams(window.location.search)
|
||||||
|
|||||||
@@ -7,11 +7,10 @@ export default defineConfig({
|
|||||||
port: 3000,
|
port: 3000,
|
||||||
open: true,
|
open: true,
|
||||||
proxy: {
|
proxy: {
|
||||||
// Proxy all /logos/* requests to the backend
|
'/api': {
|
||||||
'^/logos/.*': {
|
|
||||||
target: process.env.VITE_API_URL || 'http://localhost:8080',
|
target: process.env.VITE_API_URL || 'http://localhost:8080',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
secure: false
|
rewrite: (path) => path.replace(/^\/api/, '')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user