This commit is contained in:
Tomáš Dvořák
2025-10-03 17:43:39 +02:00
parent cdb8bcd3e9
commit 07ed0c7a0c
5 changed files with 4 additions and 20 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ import './style.css'
import gsap from 'gsap'
// Configuration
const API_BASE_URL = window.location.hostname === 'localhost' ? '/api' : 'http://localhost:8080'
const API_BASE_URL = '' // Requests will be made to the same origin, and Vite will proxy /logos to the backend
// Get UUID from URL
const urlParams = new URLSearchParams(window.location.search)
+3 -2
View File
@@ -7,10 +7,11 @@ export default defineConfig({
port: 3000,
open: true,
proxy: {
'/api': {
// Proxy all /logos/* requests to the backend
'^/logos/.*': {
target: process.env.VITE_API_URL || 'http://localhost:8080',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '')
secure: false
}
}
},