osr proxy

This commit is contained in:
2026-04-04 11:29:19 -04:00
parent 9b8b9ec664
commit 27a2904bab
20 changed files with 688 additions and 354 deletions

View File

@@ -124,7 +124,7 @@ export default defineConfig((/* ctx */) => {
'/api': {
target: 'http://localhost:49151',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ''),
// rewrite: (path) => path.replace(/^\/api/, ''),
},
'/socket.io': {
target: 'http://localhost:49151', // Your backend WebSocket server
@@ -134,24 +134,15 @@ export default defineConfig((/* ctx */) => {
changeOrigin: true,
// rewrite: (path) => path.replace(/^\/socket.io/, ''),
},
'/osm': {
target: 'https://nominatim.openstreetmap.org',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/osm/, ''),
headers: {
Referer: 'https://nominatim.openstreetmap.org/',
'User-Agent': 'map-sim-location/0.0.1 (iam@williambr.uno)',
},
},
'/ors': {
// target: 'https://router.project-osrm.org',
// target: 'https://router.project-osrm.org',
target: 'http://localhost:8080',
changeOrigin: true,
// rewrite: (path) => path.replace(/^\/osrm/, ''),
// headers: {
// Referer: 'https://router.project-osrm.org/',
// 'User-Agent': 'map-sim-location/0.0.1 (iam@williambr.uno)',
// },
// rewrite: (path) => path.replace(/^\/osrm/, ''),
// headers: {
// Referer: 'https://router.project-osrm.org/',
// 'User-Agent': 'map-sim-location/0.0.1 (iam@williambr.uno)',
// },
},
},
},